From 45fbe39631479fe5681a3ecb456a6556edeb0d63 Mon Sep 17 00:00:00 2001 From: waterWang Date: Tue, 11 Aug 2026 05:21:30 +0800 Subject: [PATCH] fix(legend): use bottom:0 default so legend no longer overlaps axis labels The default legend position used bottom: tokens.size.m (15px) from the container bottom. When the grid has its own bottom offset or containLabel is configured, the x-axis labels extend below the grid and can overlap with the legend sitting 15px up. Setting the default bottom to 0 pushes the legend down to the container's bottom edge, leaving the space between grid and legend to the axis labels, which matches how the layout reference is consumed. Users can still override with an explicit 'bottom'. Closes #21662. --- src/component/legend/LegendModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/legend/LegendModel.ts b/src/component/legend/LegendModel.ts index e03fe26f89..8bc18c16e8 100644 --- a/src/component/legend/LegendModel.ts +++ b/src/component/legend/LegendModel.ts @@ -457,7 +457,7 @@ class LegendModel extends ComponentMode left: 'center', // right: 'center', // top: 0, - bottom: tokens.size.m, + bottom: 0, align: 'auto',