feat(Timeseries & MixedTimeseries): Force selected timegrain on timeseries intervals when the x-axis is of timestamp type (#34595)

This commit is contained in:
Devanjan Banerjee
2025-09-11 08:57:23 +05:30
committed by GitHub
parent 5a2411fa64
commit eb4351af83
12 changed files with 47 additions and 2 deletions

View File

@@ -214,6 +214,7 @@ export default function transformProps(
sortSeriesAscending,
sortSeriesAscendingB,
timeGrainSqla,
forceMaxInterval,
percentageThreshold,
showQueryIdentifiers = false,
metrics = [],
@@ -583,11 +584,17 @@ export default function transformProps(
},
minorTick: { show: minorTicks },
minInterval:
xAxisType === AxisType.Time && timeGrainSqla
xAxisType === AxisType.Time && timeGrainSqla && !forceMaxInterval
? TIMEGRAIN_TO_TIMESTAMP[
timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP
]
: 0,
maxInterval:
xAxisType === AxisType.Time && timeGrainSqla && forceMaxInterval
? TIMEGRAIN_TO_TIMESTAMP[
timeGrainSqla as keyof typeof TIMEGRAIN_TO_TIMESTAMP
]
: undefined,
...getMinAndMaxFromBounds(
xAxisType,
truncateXAxis,