From 809a85c91d5982df0ec0f42789385097e6ef87b4 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Mon, 30 Mar 2026 14:02:04 +0100 Subject: [PATCH] feat: enhance resolveQueryConfigs to support combining primary and multiple queries --- .../Components/DashboardChartComponent.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/App/FeatureSet/Dashboard/src/Components/Dashboard/Components/DashboardChartComponent.tsx b/App/FeatureSet/Dashboard/src/Components/Dashboard/Components/DashboardChartComponent.tsx index 13cacd6c21..2f563f6795 100644 --- a/App/FeatureSet/Dashboard/src/Components/Dashboard/Components/DashboardChartComponent.tsx +++ b/App/FeatureSet/Dashboard/src/Components/Dashboard/Components/DashboardChartComponent.tsx @@ -29,18 +29,22 @@ const DashboardChartComponentElement: FunctionComponent = ( const [error, setError] = React.useState(null); const [isLoading, setIsLoading] = React.useState(true); - // Resolve query configs - support both single and multi-query + // Resolve query configs - combine primary query with additional queries const resolveQueryConfigs: () => Array = () => { + const configs: Array = []; + + if (props.component.arguments.metricQueryConfig) { + configs.push(props.component.arguments.metricQueryConfig); + } + if ( props.component.arguments.metricQueryConfigs && props.component.arguments.metricQueryConfigs.length > 0 ) { - return props.component.arguments.metricQueryConfigs; + configs.push(...props.component.arguments.metricQueryConfigs); } - if (props.component.arguments.metricQueryConfig) { - return [props.component.arguments.metricQueryConfig]; - } - return []; + + return configs; }; const queryConfigs: Array = resolveQueryConfigs();