0

I have tried this linked

http://jsfiddle.net/jasonantho/wmab3tyw/6/

please help me with more comment lines on code to clearly understand it

i have finished the multiple line graph but i need to get tooltip with the information data please any one help me on this thanks in advance.

Joyson
  • 370
  • 4
  • 18

1 Answers1

1

The easiest way to do this is to append an svg:title element to each circle, as the browser will take care of showing the tooltip and you don't need the mousehandler. The code would be something like

vis.selectAll("circle")
   .data(datafiltered).enter().append("svg:circle")
   ...
   .append("svg:title")
   .text(function(d) { return d.x; });

If you want fancier tooltips, you could use tipsy for example. See here for an example.

This answer was taken from Show data on mouseover of circle. I put the same answer here as recomendation :D

Community
  • 1
  • 1
Richard Fazzi
  • 433
  • 3
  • 9
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/13973168) – andreas Oct 13 '16 at 16:07
  • I edited my answer. Tnx a lot for the recomendation :D – Richard Fazzi Oct 13 '16 at 17:50