From ba95a6ccb8d74f75e1534e776b428341b695967e Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Wed, 8 Jan 2025 12:29:26 +0100 Subject: [PATCH] ui: fix funnel type selection --- .../Dashboard/components/WidgetOptions.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/Dashboard/components/WidgetOptions.tsx b/frontend/app/components/Dashboard/components/WidgetOptions.tsx index 10cec637f..992cc8c08 100644 --- a/frontend/app/components/Dashboard/components/WidgetOptions.tsx +++ b/frontend/app/components/Dashboard/components/WidgetOptions.tsx @@ -144,6 +144,13 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => { metric: 'Metric', table: 'Table', }; + const funnelChartTypes = { + chart: 'Funnel Bar', + columnChart: 'Funnel Column', + metric: 'Metric', + table: 'Table', + } + const usedChartTypes = metric.metricType === FUNNEL ? funnelChartTypes : chartTypes; const chartIcons = { lineChart: , barChart: , @@ -166,7 +173,7 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => { 'metric', 'table', ], - [FUNNEL]: ['lineChart', 'areaChart', 'barChart', 'progressChart', 'pieChart', 'metric', 'table'], + [FUNNEL]: ['chart', 'columnChart', 'metric', 'table'], }; return ( { label: (
{chartIcons[key]} -
{chartTypes[key]}
+
{usedChartTypes[key]}
), })), @@ -196,7 +203,7 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => { > {chartIcons[metric.viewType]} -
{chartTypes[metric.viewType]}
+
{usedChartTypes[metric.viewType]}