Get values by mouseover on Line chart


« 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 Goldy on 14th June 2013
Im using Line Graph and its getting updated dynamically.
In between I am pausing the graph by clearing the timer.
During this time I want to provide a feature of mouse over the graph and see the values of the x and y axes
How do I achieve that ?

Thanks
Posted by RGraph support on 14th June 2013
Hi there,

There are no X values in the Line chart - only Y values - and for that you can use the obj.getValue(e) (oe obj.getValue([x, y])) method.




PS Could you link to the RGraph website - thanks.

Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support
Posted by Goldy on 14th June 2013
Can you show an example of this method ?
Why cant the Line chart have Xvalues. I want to get something like a
google Finance graph. In which if I mouse over the graph I can see the price of stocks along with its date

Thanks
Posted by RGraph support on 14th June 2013
Hi there,

It's pretty easy to use:

myLine.onclick = function (e, shape)
{
     var yValue = myLine.getValue(e);
}

Just do that inside your event handler as shown. There's probably a demo of it - or a similar function 0 in the demos directory:

www.rgraph.net/demos/


And if you want an X/Y chart you need to use the Sctter chart with the line enabled.



Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer

Add a reply

 




« Back to message list
RGraph on social media