Home › Forums › Feature Requests & Feedback › Export Chart as Image/Get chart data as Base64 format › Reply To: Export Chart as Image/Get chart data as Base64 format

#30981

@sunrise,

Exporting entire StockChart as base64 is not available as an inbuilt feature as of now. However you can do so by using html2canvas. Below is the code-snippet for the same.

html2canvas(document.querySelector("#chartContainer")).then(canvas => {  
	var dataURL = canvas.toDataURL();
	console.log(dataURL)
});

Please take a look at this JSFiddle for complete code.
exporting stockchart as base64 image

—
Vishwas R
Team CanvasJS