The LineGraph.js component currently will not display times in the x-axis according to UTC even with isUTC: true.
Desired Behavior
When you enter isUTC: true as a prop, the Line Graph will display all date values (ie. 1528487686098) for UTC time (as seen from time zone +00 or Greenwich Mean Time).
The fix
The bug happens because d3.timeFormat defaults to locale time. If we use d3.utcFormat it will use UTC time.
Current Behavior
The
LineGraph.js
component currently will not display times in the x-axis according to UTC even withisUTC: true
.Desired Behavior
When you enter
isUTC: true
as a prop, the Line Graph will display all date values (ie. 1528487686098) for UTC time (as seen from time zone +00 or Greenwich Mean Time).The fix
The bug happens because
d3.timeFormat
defaults to locale time. If we used3.utcFormat
it will use UTC time.Docs for d3.timeFomat.
Docs for d3.utcFormat.