Convert text for internationalization.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import CheckVisible from 'components/helpers/CheckVisible';
|
||||
import BarChart from './BarChart';
|
||||
|
||||
export default function PageviewsChart({ websiteId, data, unit, records, className }) {
|
||||
const intl = useIntl();
|
||||
|
||||
const handleUpdate = chart => {
|
||||
const {
|
||||
data: { datasets },
|
||||
@@ -26,7 +29,10 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa
|
||||
chartId={websiteId}
|
||||
datasets={[
|
||||
{
|
||||
label: 'unique visitors',
|
||||
label: intl.formatMessage({
|
||||
id: 'metrics.unique-visitors',
|
||||
defaultMessage: 'Unique visitors',
|
||||
}),
|
||||
data: data.uniques,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.4)',
|
||||
@@ -34,7 +40,10 @@ export default function PageviewsChart({ websiteId, data, unit, records, classNa
|
||||
borderWidth: 1,
|
||||
},
|
||||
{
|
||||
label: 'page views',
|
||||
label: intl.formatMessage({
|
||||
id: 'metrics.page-views',
|
||||
defaultMessage: 'Page views',
|
||||
}),
|
||||
data: data.pageviews,
|
||||
lineTension: 0,
|
||||
backgroundColor: 'rgb(38, 128, 235, 0.2)',
|
||||
|
||||
Reference in New Issue
Block a user