mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 17:45:38 +01:00
Revert "Fixed realtime chart for relational. Removed getDateArray. Added chart min/max dates."
This reverts commit 647dcb5f25.
This commit is contained in:
parent
82f766342e
commit
5e5b61dc7e
7 changed files with 46 additions and 46 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { useMemo } from 'react';
|
||||
import { colord } from 'colord';
|
||||
import BarChart from 'components/charts/BarChart';
|
||||
import { getDateArray } from 'lib/date';
|
||||
import { useLocale, useDateRange, useWebsiteEventsSeries } from 'components/hooks';
|
||||
import { CHART_COLORS } from 'lib/constants';
|
||||
import { renderDateLabels } from 'lib/charts';
|
||||
|
|
@ -30,6 +31,10 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
|
|||
return obj;
|
||||
}, {});
|
||||
|
||||
Object.keys(map).forEach(key => {
|
||||
map[key] = getDateArray(map[key], startDate, endDate, unit);
|
||||
});
|
||||
|
||||
return {
|
||||
datasets: Object.keys(map).map((key, index) => {
|
||||
const color = colord(CHART_COLORS[index % CHART_COLORS.length]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue