Setting exportEnabled to true lets you to export StockChart as an image in JPG / PNG formats or to print it.
var stockChart = new CanvasJS.StockChart("container", { . . exportEnabled: true, . . }); stockChart.render();
Also See: