TimeSeries: Fixes x-axis time format when tick increment is larger than a year (#36335)

* TimeSeries: Fixes x-axis time format when tick increment is larger than a year

* removed modal change

* removed modal change
This commit is contained in:
Torkel Ödegaard
2021-07-01 13:39:30 +02:00
committed by GitHub
parent 379ed0a6f7
commit f152180dc3
@@ -170,7 +170,7 @@ function formatTime(self: uPlot, splits: number[], axisIdx: number, foundSpace:
const yearRoundedToDay = Math.round(timeUnitSize.year / timeUnitSize.day) * timeUnitSize.day;
const incrementRoundedToDay = Math.round(foundIncr / timeUnitSize.day) * timeUnitSize.day;
let format = systemDateFormats.interval.minute;
let format = systemDateFormats.interval.year;
if (foundIncr < timeUnitSize.second) {
format = systemDateFormats.interval.second.replace('ss', 'ss.SS');