diff --git a/components/metrics/BarChart.js b/components/metrics/BarChart.js index 9cc5b929..a3a3876f 100644 --- a/components/metrics/BarChart.js +++ b/components/metrics/BarChart.js @@ -151,7 +151,7 @@ export default function BarChart({ updateChart(); } } - }, [datasets, unit, animationDuration]); + }, [datasets, unit, animationDuration, locale]); return ( <> diff --git a/components/metrics/PageviewsChart.js b/components/metrics/PageviewsChart.js index 2f38f5bf..9c112798 100644 --- a/components/metrics/PageviewsChart.js +++ b/components/metrics/PageviewsChart.js @@ -12,7 +12,15 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa } = chart; datasets[0].data = data.uniques; + datasets[0].label = intl.formatMessage({ + id: 'metrics.unique-visitors', + defaultMessage: 'Unique visitors', + }); datasets[1].data = data.pageviews; + datasets[1].label = intl.formatMessage({ + id: 'metrics.page-views', + defaultMessage: 'Page views', + }); chart.update(); };