Home forums Chart Support How can I get the current x-value of my mouse when it is over a line graph?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #15805


    I know how to get the x-value at a point on a graph and have it displayed in the toolTip. What I would like to do is be able to mouse over anywhere on a line graph canvas and be able to display the current x-value, whether or not there is a point there or not. This will not be displayed with toolTip, but instead with my own custom way.

    How can I get the x-value of my mouse?



    I figured out that I can use convertPixelToValue(). For some reason the mousemove event does not work with my charts, but will work in this jsfiddle: http://jsfiddle.net/8ntLjscz/ . Any ideas on what could cause the event to not trigger? I made sure to put the event after the chart creation.

    • This reply was modified 3 years, 2 months ago by ayy. Reason: typo


    I was able to work around this by making a listener for each chart separately.



    Glad, that you figured it out.

    Indranil Deo,
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.