You can easily Print or Save StockChart as image in JPG / PNG format on the client side without requiring any server scripts. API gives flexibility to have custom filename for the exported image. In the below example, try editing code to set custom filename. Use menu to the top right corner to try these features.
window.onload = function () { var dataPoints1 = [], dataPoints2 = []; var stockChart = new CanvasJS.StockChart("chartContainer",{ theme: "light2", exportEnabled: true, exportFileName: "CanvasJS StockChart", //Change it to "Stock Chart" title:{ text:"StockChart with Export Feature" }, subtitles: [{ text: "Click the Menu in top-right to Export StockChart" }], charts: [{ axisX: { crosshair: { enabled: true, snapToDataPoint: true } }, axisY: { title: "Litecoin Price", prefix: "$" }, toolTip: { shared: true }, data: [{ name: " Price (in USD)", yValueFormatString: "$#,###.##", type: "candlestick", color: "grey", dataPoints : dataPoints1 }] }], navigator: { data: [{ color: "grey", dataPoints: dataPoints2 }], slider: { minimum: new Date(2018, 06, 01), maximum: new Date(2018, 08, 01) } } }); $.getJSON("https://canvasjs.com/data/docs/ltcusd2018.json", function(data) { for(var i = 0; i < data.length; i++){ dataPoints1.push({x: new Date(data[i].date), y: [Number(data[i].open), Number(data[i].high), Number(data[i].low), Number(data[i].close)]});; dataPoints2.push({x: new Date(data[i].date), y: Number(data[i].close)}); } stockChart.render(); }); }