0

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

gunjan
  • 125
  • 3
  • 11

3 Answers3

0

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?

Community
  • 1
  • 1
Scott Cameron
  • 5,293
  • 2
  • 29
  • 32
0

What exactly you want to show on tool tip? Is it data value or some text?

parthvijay
  • 21
  • 1
  • 4
0

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.

parthvijay
  • 21
  • 1
  • 4