Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/umami-software/umami into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscao633 committed Apr 2, 2024
2 parents 05079f3 + a695f6d commit bc5e85c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/charts/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ export function Chart({
const updateChart = (data: any) => {
chart.current.data.datasets.forEach((dataset: { data: any }, index: string | number) => {
dataset.data = data?.datasets[index]?.data;
chart.current.legend.legendItems[index].text = data?.datasets[index].label;
});

chart.current.options = options;

// Allow config changes before update
onUpdate?.(chart.current);

chart.current.update(updateMode);

setLegendItems(chart.current.legend.legendItems);

chart.current.update(updateMode);
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/metrics/PageviewsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function PageviewsChart({ data, unit, isLoading, ...props }: PageviewsCha
},
],
};
}, [data]);
}, [data, locale]);

return (
<BarChart
Expand Down
2 changes: 1 addition & 1 deletion src/tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
title: encode(title),
url: encode(currentUrl),
referrer: encode(currentRef),
tag: tag ? tag : undefined,
});

/* Event handlers */
Expand Down Expand Up @@ -217,7 +218,6 @@
...getPayload(),
name: obj,
data: typeof data === 'object' ? data : undefined,
tag,
});
} else if (typeof obj === 'object') {
return send(obj);
Expand Down

0 comments on commit bc5e85c

Please sign in to comment.