Open jtlan opened 9 years ago
If you want Dates nicely specified, you need to not use the UTC notation, hence this will work http://jsfiddle.net/cgh159Ld/6/
However, discovered this https://github.com/palantir/plottable/issues/2447
Reopen, since I think we might want to consider if UTC is more appropriate by default, since it will produce consistent visual results regardless of the time zone you are in. It also plays better with Date
values generated using millisecond time stamps.
However, this would be a breaking change (non-API), so we should do it in v2.0.0.
Clearer repro using Plots.Scatter
: http://jsfiddle.net/jx74a51x/
Avoiding shifts using local time strings: http://jsfiddle.net/fdkngxmj/ Doesn't seem very convenient though, and unix timestamps are still broken.
Scales.Time
would also have to be UTC to fix this.
Since "assume all dates are local" is also consistent, and we're not sure if switching to "assume all dates are UTC" will yield immediate benefits, going to defer this.
Repro http://jsfiddle.net/cgh159Ld/3/
Actual:
Bars andAxes.Time
are shifted by the local offset from UTC. Expected:Bars andAxes.Time
are aligned on date-boundaries, as no hours were specified in either the data or the domain.EDIT 2015-11-16: Only the
Axis
is shifted; the data is in the right spot, as evidenced by http://jsfiddle.net/jx74a51x/