and redraw a chart, but the methods I tried and readed doesn't works properly.
So far, i'm at this point:
var ctx = document.getElementById("PieChart");
const context = ctx.getContext('2d');
context.clearRect(0, 0, canvas.width, canvas.height);
var myChart = new Chart(ctx, {
type: 'pie',
data: idata});
But as I said, it doesnt works, any help? Thanks!!!
you can just remove or empty the element
Обсуждают сегодня