From 2d408ce6c2a1306a5f46f3723a80f712c0145b6d Mon Sep 17 00:00:00 2001 From: gordern <458957068@qq.com> Date: Mon, 5 Jul 2021 16:27:51 +0800 Subject: [PATCH] fix(plugin-chart-echarts): fix time-series chart xAxisShowMin(Max)Label default value (#1161) * fix(plugin-chart-echarts): delete showMinLabel and showMaxLabel fix https://github.com/apache/superset/issues/15042 * fix(plugin-chart-echarts): --- .../src/Timeseries/controlPanel.tsx | 26 ------------------- .../src/Timeseries/transformProps.ts | 4 --- .../src/Timeseries/types.ts | 2 -- 3 files changed, 32 deletions(-) diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/controlPanel.tsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/controlPanel.tsx index 8bfa8061f71b..ba0496eb50d2 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/controlPanel.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/controlPanel.tsx @@ -56,8 +56,6 @@ const { yAxisBounds, zoomable, xAxisLabelRotation, - xAxisShowMinLabel, - xAxisShowMaxLabel, } = DEFAULT_FORM_DATA; const config: ControlPanelConfig = { controlPanelSections: [ @@ -334,30 +332,6 @@ const config: ControlPanelConfig = { }, }, ], - [ - { - name: 'xAxisShowMinLabel', - config: { - type: 'CheckboxControl', - label: t('Show Min Label'), - default: xAxisShowMinLabel, - renderTrigger: true, - description: t('Show Min Label'), - }, - }, - ], - [ - { - name: 'xAxisShowMaxLabel', - config: { - type: 'CheckboxControl', - label: t('Show Max Label'), - default: xAxisShowMaxLabel, - renderTrigger: true, - description: t('Show Max Label'), - }, - }, - ], [ { name: 'xAxisLabelRotation', diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts index 2a9f8e108605..fa38ca984b89 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts @@ -79,8 +79,6 @@ export default function transformProps(chartProps: ChartProps): EchartsProps { stack, truncateYAxis, yAxisFormat, - xAxisShowMinLabel, - xAxisShowMaxLabel, xAxisTimeFormat, yAxisBounds, yAxisTitle, @@ -148,8 +146,6 @@ export default function transformProps(chartProps: ChartProps): EchartsProps { xAxis: { type: 'time', axisLabel: { - showMinLabel: xAxisShowMinLabel, - showMaxLabel: xAxisShowMaxLabel, formatter: xAxisFormatter, rotate: xAxisLabelRotation, }, diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/types.ts index c278d011d767..2bebbd272739 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/types.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Timeseries/types.ts @@ -90,8 +90,6 @@ export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = { tooltipTimeFormat: 'smart_date', truncateYAxis: true, yAxisBounds: [null, null], - xAxisShowMinLabel: false, - xAxisShowMaxLabel: false, zoomable: false, richTooltip: true, xAxisLabelRotation: 0,