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

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

* removed modal change

* removed modal change

(cherry picked from commit f152180dc3)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
Grot (@grafanabot)
2021-07-01 14:00:45 +02:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 81fef5b4b4
commit dc4007e7bd
@@ -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');