ISO 8601 parsing?

24 views
Skip to first unread message

Andreas Weller

unread,
Apr 20, 2015, 6:53:34 AM4/20/15
to dygraph...@googlegroups.com
Hi.
I'm logging temperature data as a csv file and would like to visualize it using dygraphs.

The csv looks like this:
2015-04-20T12:14:08+0200,23.8
2015-04-20T12:16:09+0200,23.6
2015-04-20T12:18:09+0200,22.9
2015-04-20T12:20:09+0200,22.6
2015-04-20T12:22:08+0200,23.5
2015-04-20T12:24:09+0200,24.4
2015-04-20T12:26:09+0200,24.5
2015-04-20T12:28:09+0200,24.3
2015-04-20T12:30:08+0200,23.2
2015-04-20T12:32:08+0200,23.2


When setting up my scripts I chose ISO-8601 for date/time column.
How to use them in dygraphs?

As a first attempt I tried this code at http://jsfiddle.net/eM2Mg/
But unfortunately it doesn't work.

g = new Dygraph(document.getElementById("graph"),
                 // For possible data formats, see http://dygraphs.com/data.html
                 // The x-values could also be dates, e.g. "2012/03/15"
                 "Date,Temperature\n" +
                 "http://www.andreas-weller.de/download/templog.txt",
                 {
                     // options go here. See http://dygraphs.com/options.html
                     legend: 'always',
                     animatedZooms: true,
                     title: 'dygraphs temp. test'
                 });


Regards,
  Andreas

Dan Vanderkam

unread,
Apr 20, 2015, 10:29:49 AM4/20/15
to dygraph...@googlegroups.com
I don't think your fiddle link is correct.

--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andreas Weller

unread,
Apr 21, 2015, 3:47:03 PM4/21/15
to dygraph...@googlegroups.com
Ack - the link is from the dygraphs documentation as I wanted to adapt this code...

Paste the Code from below - I only added the csv file link and removed the "hard coded" demo values...


Regards,
  Andreas

Dan Vanderkam

unread,
Apr 21, 2015, 4:34:24 PM4/21/15
to dygraph...@googlegroups.com
It's really easiest if you just provide a working demo link.

--
Reply all
Reply to author
Forward
0 new messages