fix(echarts): suppress phantom x-axis label at axis edge when no time grain (#39972)

This commit is contained in:
jesperct
2026-05-18 13:52:48 -03:00
committed by GitHub
parent 054aeb3bae
commit 5393fdfabf
4 changed files with 36 additions and 4 deletions

View File

@@ -861,7 +861,8 @@ export default function transformProps(
// boundary that formats identically to the last data-point tick (e.g.
// "2005" appears twice with Year grain). Wrap the formatter to suppress
// consecutive duplicate labels.
const showMaxLabel = xAxisType === AxisType.Time && xAxisLabelRotation === 0;
const showMaxLabel =
xAxisType === AxisType.Time && xAxisLabelRotation === 0 && !!timeGrainSqla;
const deduplicatedFormatter = showMaxLabel
? (() => {
let lastLabel: string | undefined;