mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix event colors. Updated packages.
This commit is contained in:
parent
dca51050e8
commit
b4ea70a67c
4 changed files with 148 additions and 150 deletions
|
|
@ -5,8 +5,8 @@ import { getDateArray, getDateLength } from 'lib/date';
|
|||
import useFetch from 'hooks/useFetch';
|
||||
import useDateRange from 'hooks/useDateRange';
|
||||
import useTimezone from 'hooks/useTimezone';
|
||||
import usePageQuery from 'hooks/usePageQuery';
|
||||
import { EVENT_COLORS } from 'lib/constants';
|
||||
import usePageQuery from '../../hooks/usePageQuery';
|
||||
|
||||
export default function EventsChart({ websiteId, token }) {
|
||||
const [dateRange] = useDateRange(websiteId);
|
||||
|
|
@ -44,7 +44,7 @@ export default function EventsChart({ websiteId, token }) {
|
|||
});
|
||||
|
||||
return Object.keys(map).map((key, index) => {
|
||||
const color = tinycolor(EVENT_COLORS[index]);
|
||||
const color = tinycolor(EVENT_COLORS[index % EVENT_COLORS.length]);
|
||||
return {
|
||||
label: key,
|
||||
data: map[key],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue