Question

Hi stackoverflow community!

I'm new to d3 and I'm attempting to stand on the shoulders of giants to create a visualization.

I've gotten to a place that I'm happy with my Radial Tree but i'm having trouble adding tooltips. Is it possible in a radial tree?

(I would think it is - I'm just not that clever :? )

You can see my attempt on codepen here: http://codepen.io/anon/pen/KctDb

I should also mention I haven't added many "info" tags (one is on "Heart -> ICD-10 -> I00) but i dont want to spend the time until I get the tool tip working.

Any suggestions / help would be greatly appreciated!

Thank you!

Was it helpful?

Solution

Add this code:

  .append("title")
  .text(function(d) { return d.info; })

to the code where circles are created, as it is displayed here:

enter image description here

... and node "Heart -> ICD-10 -> I00 that contains "info" will get its tooltip!

Modified codepen is here.

NOTE: This will add a tooltip for circles. If you want tooltips for radially placed labels too, than you need analogous code for labels.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top