dc.js icon indicating copy to clipboard operation
dc.js copied to clipboard

Datetime AM/PM

Open pdaems opened this issue 13 years ago • 1 comments

Im using the volumeChart like in the nasdaq example but on a more deeper level. I retrieve my data from a sql database these dates are returned like:

"7/04/2013 12:11:26.000" "7/04/2013 17:40:26.000"

I then parse the dates var dateFormat = d3.time.format("%d/%m/%Y %H:%M:%S.%L");

Now the problem is that the chart reads the dates AM/PM. So 17:40:26 becomes 5:40:26 AM.

Am i parsing my dates wrong or could the chart be adjusted ?

I tried var dateFormat = d3.time.format("%d/%m/%Y %I:%M:%S.%L %p"); but then i get Uncaught TypeError: Cannot call method 'getFullYear' of null

pdaems avatar May 07 '13 07:05 pdaems

Fixed found https://github.com/mbostock/d3/pull/491

pdaems avatar May 07 '13 12:05 pdaems