Scatter Chart, display just X axis value above point?


« 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 Ed on 9th May 2013
I have a scatter chart, that records cpu load on a server at a specific time.

Is there a way to just show the x-axis value above the point?

excerpt of array:
        var db01cpu = new RGraph.Scatter('db01cpu', [
         ['2013/05/09 12:50:01', 0.40],
         ['2013/05/09 12:52:01', 2.77],
         ['2013/05/09 12:54:01', 1.00],
         ['2013/05/09 12:56:01', 0.94],
         ['2013/05/09 12:58:01', 0.58],
         ['2013/05/09 13:00:01', 0.78],

JavaScript noob also.
Posted by RGraph support on 10th May 2013
Hi there,

There isn't an option for it - you could use chart.labels.above though that will shows the X and Y values which when using dates would look a little strange as they'll come out as numbers Here's a demo of doing it by using the ondraw event to add some text to the canvas:

dev.rgraph.net/tests/scatter/labels-above.html

PS Please remember to link to the RGraph website - cheers!

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