The issue has been closed

and I tried it in example page, also has error but like this:


so I need new Chart() again?
posted by coader about 2 years ago
You don't have to new Chart
again theoretically. It looks like that chart.clear()
doesn't work as expected. This will be fixed in this week.
Right now you use new Chart
for temporary solutions.
posted by pearmini about 2 years ago
now I use:
if (chart)
chart.clear()
chart = new Chart({
container: container.value,
autoFit: true,
})
and it works
posted by coader about 2 years ago
now I use:
if (chart)
chart.clear()
chart = new Chart({
container: container.value,
autoFit: true,
})
and it works
That sounds good! But I think there are still some problems with chart.clear
.
// Error!!!
chart.render(() => {
chart.clear();
})
posted by pearmini about 2 years ago
now I use:
if (chart)
chart.clear()
chart = new Chart({
container: container.value,
autoFit: true,
})
and it works
That sounds good! But I think there are still some problems with chart.clear
.
// Error!!!
chart.render(() => {
chart.clear();
})
This bug has fixed.
posted by pepper-nice about 2 years ago