mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Updated metrics query. Fixed chart error.
This commit is contained in:
parent
d90256b55f
commit
1579beef5b
3 changed files with 15 additions and 15 deletions
|
|
@ -80,8 +80,13 @@ 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;
|
||||
if (data?.datasets[index]) {
|
||||
dataset.data = data?.datasets[index]?.data;
|
||||
|
||||
if (chart.current.legend.legendItems[index]) {
|
||||
chart.current.legend.legendItems[index].text = data?.datasets[index]?.label;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
chart.current.options = options;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue