From ec99a8a349884f790ac792483ee486d3676730d3 Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Wed, 15 Jun 2022 19:17:35 +0800 Subject: [PATCH] feat: setting limit value when Pie chart switches --- .../plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx index 6e3a1ba593a2a..43e1ab6cba4d3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx @@ -17,7 +17,7 @@ * under the License. */ import React from 'react'; -import { t, validateNonEmpty } from '@superset-ui/core'; +import { ensureIsInt, t, validateNonEmpty } from '@superset-ui/core'; import { ControlPanelConfig, ControlPanelsContainerProps, @@ -257,6 +257,8 @@ const config: ControlPanelConfig = { ...formData, metric: formData.standardizedFormData.standardizedState.metrics[0], groupby: formData.standardizedFormData.standardizedState.columns, + row_limit: + ensureIsInt(formData.row_limit, 100) >= 100 ? 100 : formData.row_limit, }), };