use range instead of dates across the web

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-28 21:58:17 +02:00
parent c8c86d8c23
commit c5823dc4cb
11 changed files with 156 additions and 96 deletions

View File

@@ -8,23 +8,23 @@ type ReportLineChartProps = IChartInput
export const Chart = withChartProivder(({
interval,
startDate,
endDate,
events,
breakdowns,
chartType,
name,
range,
}: ReportLineChartProps) => {
const hasEmptyFilters = events.some((event) => event.filters.some((filter) => filter.value.length === 0));
const chart = api.chart.chart.useQuery(
{
interval,
chartType,
startDate,
endDate,
events,
breakdowns,
name,
range,
startDate: null,
endDate: null,
},
{
keepPreviousData: true,