diff --git a/packages/app/src/EditChartForm.tsx b/packages/app/src/EditChartForm.tsx index 4b3951535..cd9cced8c 100644 --- a/packages/app/src/EditChartForm.tsx +++ b/packages/app/src/EditChartForm.tsx @@ -62,7 +62,9 @@ const buildAndWhereClause = (query1 = '', query2 = '') => { } }; -const withDashboardFilter = ( +const withDashboardFilter = < + T extends { where?: string; series?: ChartSeries[] }, +>( chartConfig: T | null, dashboardQuery?: string, ) => { @@ -75,7 +77,9 @@ const withDashboardFilter = ( ...s, where: buildAndWhereClause( dashboardQuery, - s.type === 'time' || s.type === 'table' ? s.where : '', + s.type === 'number' || s.type === 'time' || s.type === 'table' + ? s.where + : '', ), })) : undefined,