You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/11 07:40:13 UTC

[GitHub] [superset] villebro commented on a change in pull request #17758: feat(timeseries-chart): add percentage threshold input control

villebro commented on a change in pull request #17758:
URL: https://github.com/apache/superset/pull/17758#discussion_r781821316



##########
File path: superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx
##########
@@ -136,10 +136,29 @@ const onlyTotalControl = {
   },
 };
 
+const percentageThresholdControl = {
+  name: 'percentage_threshold',
+  config: {
+    type: 'TextControl',
+    label: t('Percentage threshold'),
+    renderTrigger: true,
+    isFloat: true,
+    default: 5,

Review comment:
       This doesn't be in line with `DEFAULT_FORM_DATA.percentageThreshold` in `types.ts`, which is set to `0`. Perhaps we should import the defaults and use that here, something like
   ```javascript
   import { DEFAULT_LEGEND_FORM_DATA } from './types';
   
   const percentageThresholdControl = {
     name: ...,
     config: {
       ...,
       default: DEFAULT_FORM_DATA.percentageThreshold,
       ....
     },
   }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org