diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx index 695305e1b46f..04764d4b4336 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx @@ -67,7 +67,7 @@ const legendTypeControl: ControlSetItem = { label: t('Type'), choices: [ ['scroll', t('Scroll')], - ['plain', t('Plain')], + ['plain', t('List')], ], default: legendType, renderTrigger: true, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts index 68ff394e1bfb..5377d0e07829 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts @@ -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;