D3js Mulitline Chart Mouseover
I'm trying to adapt this D3js line chart example of mouse-over usage to my multi-line chart. It seems that d3.mouse(this)[0] on the mousemove function generate the following error:
Solution 1:
When you write
.on("mousemove", mousemove());
it is immediately call the mousemove
function and passes its return value as the listener function to the "mousemove"
event. Because you are not setting correctly the this
that is why d3.mouse(this)
returns null
.
The fix is very easy: just pass in your mousemove
function as reference and don't call it:
.on("mousemove", mousemove);
However even after this fix you will still get an error in the fiddle because your bisectDate
function is missing...
Post a Comment for "D3js Mulitline Chart Mouseover"