mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 10:35:35 +01:00
Refactored tracker. Added handling for buttons.
This commit is contained in:
parent
2197551e58
commit
28d2787880
9 changed files with 152 additions and 209 deletions
|
|
@ -10,7 +10,7 @@ export function Legend({ chart }) {
|
|||
const { locale } = useLocale();
|
||||
const forceUpdate = useForceUpdate();
|
||||
|
||||
const handleClick = index => {
|
||||
const handleClick = (index: string | number) => {
|
||||
const meta = chart.getDatasetMeta(index);
|
||||
|
||||
meta.hidden = meta.hidden === null ? !chart.data.datasets[index].hidden : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue