Data with time stamps -> X-axis that displays dates


« 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 Jeppe on 28th August 2013
Hi

I have a dataset which consists of a temperature measured each hour, with a corresponding timestamp (date and time). Is it possible to change the unit of the x-axis, so that it only shows the date (f.ex. show data for the last week, and have 22nd of august to 29th august)?

Thanks in advance!

Best regards
Jeppe
Posted by RGraph support on 28th August 2013
Hi there,

You can specify the X min/max values - but you'll need to remove the "out-of-range" values yourself by going through the data.


Richard, RGraph Support

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site
Posted by Jeppe on 28th August 2013
Thanks... but can i still plot all the values? and only show the "in-range" values on the x-axis?

Best,
Jeppe
Posted by RGraph support on 28th August 2013
Hi there,

You can - and by using the API function .getXCoord(value) - you could probably also add highlighting to the region in question. The chart.background.vbars option doesn't currently support date/time values though I'll add this for the October release.

I'll add an example for using the API for vbars.



Richard, RGraph support
Posted by RGraph support on 28th August 2013
Hi there,

It's a bit convoluted at the moment - it'll be easier when I add support to chart.background.vbars - but here's an example of highlighting one month when showing 12:

www.rgraph.net/fiddle/view/an-example-of-a-scatter-chart-with-a-date-time-range-highlighted




Richard, RGraph Support

Help support RGraph - single site license only £99
   www.rgraph.net/license#single-site
Posted by Jeppe on 28th August 2013
Great, thanks... I will try and see if I can make it work :)

Add a reply

 




« Back to message list
RGraph on social media