Skip to content

Commit d5d55ea

Browse files
add back lost comments
Signed-off-by: AntoineThebaud <antoine.thebaud@yahoo.fr>
1 parent bd63b74 commit d5d55ea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

timeserieschart/src/TimeSeriesChartPanel.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ export function TimeSeriesChartPanel(props: TimeSeriesChartProps): ReactElement
425425
}
426426

427427
const gridOverrides: GridComponentOption = useMemo(() => {
428+
// When Y axes are hidden, disable containLabel to prevent auto-spacing, but add bottom padding for X axis
428429
return echartsYAxis.show === false
429430
? {
430431
left: 0,
@@ -434,6 +435,8 @@ export function TimeSeriesChartPanel(props: TimeSeriesChartProps): ReactElement
434435
}
435436
: {
436437
left: yAxis && yAxis.label ? 30 : 20,
438+
// With containLabel: true in theme, ECharts auto-reserves space for axis labels.
439+
// For multiple right axes, add extra padding for the last axis labels that extend beyond the grid.
437440
right: additionalFormats.length > 0 ? 10 : 20,
438441
bottom: 0,
439442
containLabel: true,

0 commit comments

Comments
 (0)