Can Highcharts dateFormat support fractional seconds?
I need to display time as HH:MM:SS:sss. 2.14 doesn't seem to have this capability. I did an exhaustive google search to find out if any version of highcharts has this and I haven't been able to find it. Is there support for this in any version? If not, will there be?
Highcharts does have milliseconds display. The format you are looking for is “%H:%M:%S.%L”. See http://jsfiddle.net/cqxPq/.
-
There's no version like 2.14, but I suppose you mean 2.1.4. I confirm that milliseconds don't work in that version.
It's actually very easy to patch. In the dateFormat function, locate this line:
'S': pad(date.getSeconds()) // Two digits seconds, 00 through 59Below it, add a comma separator plus the ms definition:
'L': pad(mathRound(timestamp % 1000), 3) // Milliseconds (naming from Ruby)
-
em commented
Hi Torstein,
I'm running Highcharts 2.14. Is this functionality in that release? It isn't working for me. It shows up as 18:26:50.%L. If it isn't in 2.14, is there an easy patch for it? I can't upgrade to a newer version at this time. -
em commented
Torstein, you're the best, thanks!