javascript - populate tooltip value in d3 using attributes / scale -


I am trying to add some tooltips to some D3 rect elements, although the element attributes to populate the tooltip There is some problem in accessing the value.

The following fleet shows this problem,

My idea is to return the value of the object to the x attribute and certain types of inversion scale in D3, although my Attempted on:

  .text (d.attr ("x"));   

or

  .text (d.properties.x);   

The mouseover function is undefined, plus I believe this will be x coordinate when in fact I want to reverse the X scale of that property so that the user will see on that chart Which will appear in the match. .

What is the best way to do this?

thanks

use it , instead D :

.text (this.getAttribute ("height") / 30);

Note that the value in pixels related to the value of 30 in the x axis is 1 .

If you can get that value to the program, then it will be better.

Please, please.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -