I have a problem when i try to export the chart to an image. The backgound is black and this is the code:
var canvas=ctx;
var canvasImg = canvas.toDataURL("image/png", 1.0);
//creates PDF from img
var doc = new jsPDF('landscape');
doc.setFontSize(20);
doc.text(15, 15, "Cool Chart");
doc.addImage(canvasImg, 'JPEG', 10, 10, 280, 150 );
doc.save('canvas.pdf');