2

I want to use exactly this d3 donut chart.

This 3d chart

However, instead of showing percentage, I'd like to show the raw datas that I am providing.

Ideally, the percentage could be shown (as it is now) and I could show the raw datas for each donut part using an onmouseover tooltip!

Can't make it work.

Thanks a lot for any help!

Community
  • 1
  • 1
Laura
  • 31
  • 1
  • 3

1 Answers1

6

Are you looking for this,I update the fiddle with tool tip, Initially add a div to the body i.e.

var div = d3.select("body").append("div").attr("class", "tooltip");

then whenever user makes a mouseover or mousemove on the paths/arcs do the necessary.

have a look in http://jsfiddle.net/Q3dhh/25/

saikiran.vsk
  • 1,788
  • 1
  • 10
  • 11
  • I tried this immediately, but I can do only this when I will have 15 reputation points! Sorry :( – Laura Jul 17 '14 at 12:44
  • I've had to place `mousemove`/`mouseout` events immediately after `path.append`, as `paths.enter().append("svg:path").on('mousemove',function..)`. It doesn't trigger the mouse event properly – SerCrAsH Dec 16 '16 at 12:15