From b4497edb059bb608798312eb998342037cddcd33 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Tue, 18 Feb 2025 14:36:17 +0100 Subject: [PATCH] ui: preset default chart view for heatmap --- .../components/DashboardList/NewDashModal/ExampleCards.tsx | 3 ++- .../Dashboard/components/WidgetView/WidgetView.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx index 70c494d29..cdc907a9f 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/ExampleCards.tsx @@ -87,7 +87,8 @@ export const CARD_LIST: CardType[] = [ cardType: HEATMAP, metricOf: 'heatMapUrl', category: CARD_CATEGORIES[0].key, - example: HeatmapsExample + example: HeatmapsExample, + viewType: 'chart', }, { title: 'Untitled Journey', diff --git a/frontend/app/components/Dashboard/components/WidgetView/WidgetView.tsx b/frontend/app/components/Dashboard/components/WidgetView/WidgetView.tsx index e23abc804..480b59c52 100644 --- a/frontend/app/components/Dashboard/components/WidgetView/WidgetView.tsx +++ b/frontend/app/components/Dashboard/components/WidgetView/WidgetView.tsx @@ -68,7 +68,10 @@ function WidgetView({ match: { params: { siteId, dashboardId, metricId } } }: Pr name: selectedCard.title, metricOf: selectedCard.metricOf, category: mk, - viewType: selectedCard.viewType ? selectedCard.viewType : selectedCard.cardType === FUNNEL ? 'chart' : 'lineChart', + viewType: + selectedCard.viewType + ? selectedCard.viewType + : selectedCard.cardType === FUNNEL ? 'chart' : 'lineChart', }; if (selectedCard.filters) { cardData.series = [