@lujakob
You can get base64 image data of a canvas by using toDataURL method. As CanvasJS charts are rendered on canvas, you can use toDataURL to get base64 image data of the chart. Please find the code-snippet below:
var base64Image = chart.canvas.toDataURL();
Please take a look at this JSFiddle for a working example.
—
Ananya Deka
Team CanvasJS