Skip to content

Commit

Permalink
fix: include where clause for number chart (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrn14897 committed Mar 14, 2024
1 parent bd41a58 commit b4a0961
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/app/src/EditChartForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ const buildAndWhereClause = (query1 = '', query2 = '') => {
}
};

const withDashboardFilter = <T extends { where?: string; series?: any[] }>(
const withDashboardFilter = <
T extends { where?: string; series?: ChartSeries[] },
>(
chartConfig: T | null,
dashboardQuery?: string,
) => {
Expand All @@ -75,7 +77,9 @@ const withDashboardFilter = <T extends { where?: string; series?: any[] }>(
...s,
where: buildAndWhereClause(
dashboardQuery,
s.type === 'time' || s.type === 'table' ? s.where : '',
s.type === 'number' || s.type === 'time' || s.type === 'table'
? s.where
: '',
),
}))
: undefined,
Expand Down

0 comments on commit b4a0961

Please sign in to comment.