This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a50a9b380 feat: setting limit value when Pie chart switches (#20392)
0a50a9b380 is described below

commit 0a50a9b3804837ea7130f91bfcfcca57ab50129f
Author: Yongjie Zhao <[email protected]>
AuthorDate: Wed Jun 15 21:49:00 2022 +0800

    feat: setting limit value when Pie chart switches (#20392)
---
 .../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 6e3a1ba593..43e1ab6cba 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,
   }),
 };
 

Reply via email to