fix(chart): align legend with chart grid in List mode for Top/Bottom orientations (#36077)

This commit is contained in:
Richard Fogaca Nienkotter
2025-11-14 07:14:21 -03:00
committed by GitHub
parent 78f9debdd4
commit 37d58a476c
2 changed files with 10 additions and 1 deletions

View File

@@ -482,8 +482,17 @@ export function getLegendProps(
break;
case LegendOrientation.Bottom:
legend.bottom = 0;
if (padding?.left) {
legend.left = padding.left;
}
break;
case LegendOrientation.Top:
legend.top = 0;
legend.right = zoomable ? TIMESERIES_CONSTANTS.legendTopRightOffset : 0;
if (padding?.left) {
legend.left = padding.left;
}
break;
default:
legend.top = 0;
legend.right = zoomable ? TIMESERIES_CONSTANTS.legendTopRightOffset : 0;