Removes the StockChart references internally, thus making the StockChart eligible for garbage collection.
Example: stockChart.destroy();var stockChart = new CanvasJS.StockChart("container",
{
.
.
.
.
});
stockChart.render();
stockChart.destroy();
stockChart = null;