diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx index 76c1465357b73..3908ea4516d9b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/controlPanel.tsx @@ -124,6 +124,10 @@ const config: ControlPanelConfig = { EchartsFunnelLabelTypeType.KeyValuePercent, t('Category, Value and Percentage'), ], + [ + EchartsFunnelLabelTypeType.ValuePercent, + t('Value and Percentage'), + ], ], description: t('What should be shown as the label'), }, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts index a8d8c9e65cc3d..df43fe0a83d73 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts @@ -94,6 +94,8 @@ export function formatFunnelLabel({ return `${name}: ${formattedValue} (${formattedPercent})`; case EchartsFunnelLabelTypeType.KeyPercent: return `${name}: ${formattedPercent}`; + case EchartsFunnelLabelTypeType.ValuePercent: + return `${formattedValue} (${formattedPercent})`; default: return name; } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/types.ts index 928664e223c91..51595622345e7 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Funnel/types.ts @@ -52,6 +52,7 @@ export enum EchartsFunnelLabelTypeType { KeyValue, KeyPercent, KeyValuePercent, + ValuePercent, } export interface EchartsFunnelChartProps 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 53d406538d622..8a7612c20f973 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx @@ -107,6 +107,7 @@ const config: ControlPanelConfig = { ['key_value', t('Category and Value')], ['key_percent', t('Category and Percentage')], ['key_value_percent', t('Category, Value and Percentage')], + ['value_percent', t('Value and Percentage')], ], description: t('What should be shown on the label?'), }, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts index 4ad92b0bb2e0d..031b072b449de 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts @@ -80,6 +80,8 @@ export function formatPieLabel({ return `${name}: ${formattedValue} (${formattedPercent})`; case EchartsPieLabelType.KeyPercent: return `${name}: ${formattedPercent}`; + case EchartsPieLabelType.ValuePercent: + return `${formattedValue} (${formattedPercent})`; default: return name; } diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts index d4acbb9517107..631c1c7de3568 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts @@ -54,6 +54,7 @@ export enum EchartsPieLabelType { KeyValue = 'key_value', KeyPercent = 'key_percent', KeyValuePercent = 'key_value_percent', + ValuePercent = 'value_percent', } export interface EchartsPieChartProps