How to get X and Y cords of a chart on crosshair snap

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Ammar on 8th April 2013
Hi,

I want to know How can I display both the X and Y co-ordinates from a chart. Is there any way to return the x and y co-ords on click or on snap function?
Posted by RGraph support on 9th April 2013
Hi there,

With the Scatter chart you can use:

obj.getYValue(e)
obj.getXValue(e)

in your event listener. e represents the event object.

There's no concept of an X scale with the Line chart so if you want an X scale you'll need to use the Scatter chart.


Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support

Add a reply




« Back to message list