michael-s-molina commented on code in PR #25666:
URL: https://github.com/apache/superset/pull/25666#discussion_r1365355910


##########
superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts:
##########
@@ -227,13 +229,13 @@ export default function transformProps(
     },
     tooltip: {
       ...getDefaultTooltip(refs),
-      show: !inContextMenu,
+      show: showTooltipLabels,

Review Comment:
   `inContextMenu` is used to avoid showing the tooltip when right clicking.
   ```suggestion
         show: !inContextMenu & showTooltipLabels,
   ```



##########
superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx:
##########
@@ -105,6 +105,32 @@ const config: ControlPanelConfig = {
             },
           },
         ],
+        [
+          {
+            name: 'tooltip_label_type',
+            config: {
+              type: 'SelectControl',
+              label: t('Tooltip Contents'),
+              default: labelType,
+              renderTrigger: true,
+              choices: [
+                [EchartsFunnelLabelTypeType.Key, t('Category Name')],
+                [EchartsFunnelLabelTypeType.Value, t('Value')],
+                [EchartsFunnelLabelTypeType.Percent, t('Percentage')],
+                [EchartsFunnelLabelTypeType.KeyValue, t('Category and Value')],
+                [
+                  EchartsFunnelLabelTypeType.KeyPercent,
+                  t('Category and Percentage'),
+                ],
+                [
+                  EchartsFunnelLabelTypeType.KeyValuePercent,
+                  t('Category, Value and Percentage'),
+                ],
+              ],
+              description: t('What should be shown on the tooltip Label?'),

Review Comment:
   Could you make sure the descriptions are not questions for all controls? It 
will be more consistent with other plugins?



##########
superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx:
##########
@@ -84,8 +84,8 @@ const config: ControlPanelConfig = {
             name: 'label_type',
             config: {
               type: 'SelectControl',
-              label: t('Label Type'),
-              default: labelType,
+              label: t('Label Contents'),
+              default: EchartsFunnelLabelTypeType.KeyValuePercent,

Review Comment:
   Could you make sure the defaults come from `DEFAULT_FORM_DATA`?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to