mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(chart): align legend with chart grid in List mode for Top/Bottom orientations (#36077)
This commit is contained in:
committed by
GitHub
parent
78f9debdd4
commit
37d58a476c
@@ -67,7 +67,7 @@ const legendTypeControl: ControlSetItem = {
|
||||
label: t('Type'),
|
||||
choices: [
|
||||
['scroll', t('Scroll')],
|
||||
['plain', t('Plain')],
|
||||
['plain', t('List')],
|
||||
],
|
||||
default: legendType,
|
||||
renderTrigger: true,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user