mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Replace chart legend with custom component.
This commit is contained in:
parent
894736d474
commit
8e987b6b9d
5 changed files with 41 additions and 15 deletions
|
|
@ -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
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue