From 09671a439423f293a33a05ea81dbef1dfc355bcb Mon Sep 17 00:00:00 2001 From: smileydev <47900232+prosdev0107@users.noreply.github.com> Date: Mon, 2 May 2022 16:37:11 -0400 Subject: [PATCH] feat(chart & legend): make to enable show legend by default (#19927) --- .../plugins/legacy-plugin-chart-heatmap/src/controlPanel.ts | 2 +- .../plugins/legacy-plugin-chart-histogram/src/controlPanel.ts | 2 +- .../plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx | 2 +- superset-frontend/plugins/plugin-chart-echarts/src/types.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.ts index b270d43e35371..ab3eb2a59fa11 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-heatmap/src/controlPanel.ts @@ -274,7 +274,7 @@ const config: ControlPanelConfig = { type: 'CheckboxControl', label: t('Legend'), renderTrigger: true, - default: false, + default: true, description: t('Whether to display the legend (toggles)'), }, }, diff --git a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts index b049cb78398f3..26cec94749e6e 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts +++ b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts @@ -128,7 +128,7 @@ const config: ControlPanelConfig = { type: 'CheckboxControl', label: t('Legend'), renderTrigger: true, - default: false, + default: true, description: t('Whether to display the legend (toggles)'), }, }, diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx index 151c53e41f2ff..3b53b2add08e3 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx @@ -148,7 +148,7 @@ export const showLegend: CustomControlItem = { type: 'CheckboxControl', label: t('Legend'), renderTrigger: true, - default: false, + default: true, description: t('Whether to display the legend (toggles)'), }, }; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/types.ts index edaf0f903177d..f50397c9ef518 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/types.ts @@ -87,7 +87,7 @@ export const DEFAULT_LEGEND_FORM_DATA: EchartsLegendFormData = { legendMargin: null, legendOrientation: LegendOrientation.Top, legendType: LegendType.Scroll, - showLegend: false, + showLegend: true, }; export type EventHandlers = Record;