Does anyone have an example of a TechanJS H1, hourly chart (http://techanjs.org/) that uses the ISO 8061 date standard?
Thanks
Does anyone have an example of a TechanJS H1, hourly chart (http://techanjs.org/) that uses the ISO 8061 date standard?
Thanks
Figured it out: Use the following techan formats:
// JavaScript
var parseDate = d3.time.format("%Y-%m-%dT%H:%M:%S").parse,
timeFormat = d3.time.format('%Y-%m-%dT%H:%M:%S'),
valueFormat = d3.format(',.5fs');
Use the following date format (note exactly ISO but it's what C# Json WebAPI's outputting which is what I'm after):
// C#
DateTime.ToString("yyyy-MM-ddTHH:mm:ss")
// 2015-08-24T17:00:00
If you have a look into test/spec/bundle/_util/date.js (v.0.6.0-6) there should be a function called parseIso8601.
I wrote it myself :)