with a button I make a graph with the library char.js
, but when I want to return to traffic I get an error:
I'm trying to solve with this code but it does not work.
$('#myChart_2').remove();
$('#contenedor_grafico_2').append("<canvas id='myChart_2' width='100' height='30'></canvas>");
var ctx = $("#myChart_2");