Using the AfterCanvasGenerated callback, the canvas that contains the gantt can be read. Then the canvas can be converted to image data using "canvas.toDataURL()" method. You can send the obtained image data to server using an ajax call like below.
Here is the code example:
|
function afterCanvasGeneratedCallBack(canvas) { canvasDataURL = canvas.toDataURL("image/jpg");
// canvasDataURL holds the url of the image. Instead of alert you can do ajax call to pass the image to server alert(canvasDataURL);
// prevents the default behaviour of export to image feature. return false; } Gantt.ExportToImage({ AfterCanvasGenerated: afterCanvasGeneratedCallBack }); |
� RadiantQ 2022. All Rights Reserved.