Removes the chart references internally, thus making the chart eligible for garbage collection, in turn clearing up the memory.
Example: chart.destroy();var chart = new CanvasJS("container", { . . . . }); chart.render(); chart.destroy(); chart = null;
Also See: