exportChart method lets you export StockChart as image (jpg or png) programmatically.
By default, StockChart is exported in png format, if format not given.
Parameters:var stockChart = new CanvasJS.StockChart("container", { . . . . }); stockChart.render(); stockChart.exportChart({ format: "jpg" });