0

I want to create a simple tooltip for a pie graph in D3. Most of the tooltip examples I've seen on the net are for bar graphs.

Is there an easy way to create such tooltips for a pie graph? If possible, I'd really appreciate a small working example.

  • Most tooltip configurations will work just as well on a pie chart as on a bar chart (e.g., this one: http://bl.ocks.org/mbostock/1087001). Just set the mouse events on your `arc` or `path` object. – Jacob Brown Jul 12 '13 at 19:55
  • The easiest way is to append a `title` element to the segments, see [this answer](http://stackoverflow.com/questions/10805184/d3-show-data-on-mouseover-of-circle/10806220#10806220). – Lars Kotthoff Jul 12 '13 at 20:44
  • Thanks for the links. I had seen those already. What I wanted was something like this: http://bl.ocks.org/biovisualize/1016860 –  Jul 13 '13 at 02:14

0 Answers0