Could you please help me in adding tooltip in stacked Bar chart. I have created Fiddle Link
i want to add tool tip on each bar chart ie. Each bar should show tool tip for each color. How can i do that.
> NA
Thanks in advance
You can append a title
element under each rect
and give it a text value of whatever you want the tooltip to say.
Here's a related question showing more details: How to add a tooltip to an svg graphic?
You can add
.append("svg:title")
.text(function(d){
return yourData;
}
});
This function should work for you and put the variable name where you are getting corresponding values of bars.