I have a problem with an SVG Scatter/datetime 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 Matt S. on 31st October 2017

I'm trying to create a scatter chart with sensor values from the past 24 hours.
My data looks something like this:
var data = [
  {x:'2017-10-30 08:51:00',y:160,tooltip:'160ppm, 2017-10-30 08:51:00'},
  {x:'2017-10-30 08:56:00',y:405,tooltip:'405ppm, 2017-10-30 08:56:00'},
  {x:'2017-10-31 07:16:00', y:1059, tooltip:'1059ppm, 2017-10-31 07:16:00'},
  {x:'2017-10-31 07:21:00', y:2161, tooltip:'2161ppm, 2017-10-31 07:21:00'}

xaxisMin is set for testing purposes to '2017-10-30 02:00:00' and
xaxisMax is set to '2017-10-31 23:00:00'.

Unfortunately the points get sortet after the date in the graph (all points from 2017-10-31 on top of each other), and the time seems to be ignored.

With the canvas library everything worked well, with SVG it just uses the date and not the time...
What am I doing wrong or is this feature not supported yet?

Thank you for your help!
Posted by Richard on 31st October 2017
Hi there,

My Internet connection is currently going slower than a sloth on a mobility scooter so I'll look at this later.

Posted by Richard on 31st October 2017

OK, I think I have narrowed this down to a little bug in the parseDate() function. With my crappy laptop no less (wireless networks blow chunks).

So here's an updated version of the common/core file:


So try that and see how it goes.

Posted by Matt S. on 2nd November 2017
Hi Richard

Thank you so much for your quick response!

unfortunately now i'm getting the error "Type error: text is undefined" from RGraph.svg.common.core.js ,Line 2214

Posted by Richard on 2nd November 2017
Hi there,

OK, it looks like it needs the other libraries too, so here they are. Or another option would be waiting for the next release at the end of November (probably):




Add a reply

« Back to message list