import React from 'react'; import CheckVisible from 'components/helpers/CheckVisible'; import BarChart from './BarChart'; export default function PageviewsChart({ websiteId, data, unit, className }) { const handleUpdate = chart => { const { data: { datasets }, } = chart; datasets[0].data = data.uniques; datasets[1].data = data.pageviews; chart.update(); }; if (!data) { return null; } return ( {visible => ( )} ); }