mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Chart labels should update when changing locale.
This commit is contained in:
parent
ccca5d2d99
commit
7164977f9f
@ -151,7 +151,7 @@ export default function BarChart({
|
|||||||
updateChart();
|
updateChart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [datasets, unit, animationDuration]);
|
}, [datasets, unit, animationDuration, locale]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -12,7 +12,15 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa
|
|||||||
} = chart;
|
} = chart;
|
||||||
|
|
||||||
datasets[0].data = data.uniques;
|
datasets[0].data = data.uniques;
|
||||||
|
datasets[0].label = intl.formatMessage({
|
||||||
|
id: 'metrics.unique-visitors',
|
||||||
|
defaultMessage: 'Unique visitors',
|
||||||
|
});
|
||||||
datasets[1].data = data.pageviews;
|
datasets[1].data = data.pageviews;
|
||||||
|
datasets[1].label = intl.formatMessage({
|
||||||
|
id: 'metrics.page-views',
|
||||||
|
defaultMessage: 'Page views',
|
||||||
|
});
|
||||||
|
|
||||||
chart.update();
|
chart.update();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user