Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

read willBeHidden from hiddenLabels in handleLegendClick

Yan84fe25af928d
diff --git a/src/components/charts/Chart.tsx b/src/components/charts/Chart.tsx
index 5ac44273a..cd4410b68 100644
--- a/src/components/charts/Chart.tsx
+++ b/src/components/charts/Chart.tsx
@@ -70,7 +70,7 @@ export function Chart({
// and let the parent push a new hiddenLabels set on the next render.
const { datasetIndex } = item;
const ds = chart.current.data.datasets[datasetIndex];
- onLegendClick(ds.label, !ds.hidden);
+ onLegendClick(ds.label, !hiddenLabels?.has(ds.label));
return;
}