Replace chart legend with custom component.

This commit is contained in:
Mike Cao 2020-10-14 16:39:26 -07:00
parent 894736d474
commit 8e987b6b9d
5 changed files with 41 additions and 15 deletions

View file

@ -61,14 +61,6 @@ export default function EventsChart({ websiteId, className, token }) {
});
}, [data]);
function handleCreate(options) {
const legend = {
position: 'bottom',
};
options.legend = legend;
}
function handleUpdate(chart) {
chart.data.datasets = datasets;
@ -86,7 +78,6 @@ export default function EventsChart({ websiteId, className, token }) {
datasets={datasets}
unit={unit}
records={getDateLength(startDate, endDate, unit)}
onCreate={handleCreate}
onUpdate={handleUpdate}
stacked
/>