BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Dhirender,
Thanks for using Syncfusion product.
We have analyzed this. Currently chart can be exported as image only. And then printing the image can be done manually.
We have already logged task to export chart in excel format.
The below shows the step for saving the rendered chart as image.
From version 12.3.0.36 exporting is done without using any other libraries.
To export a chart, you have to render it in HTML5 canvas. This is done by setting the below option
[ASPX]
<ej:Chart ID="Chart1" runat="server" EnableCanvasRendering="True">
</ej:Chart>
And also the button/image to perform export should be place inside <a> anchor tag.
[HTML]
<a id="download" download="Chart.png" style="float: right; cursor: pointer;" >
<img src="../images/chart/export.png" title="Export Chart"/>
</a>
We have made a sample to export the chart rendered for your reference.
Find it form the below link
Sample is coded in Defalut.aspx page
The attached file contains export sample in both JS and ASP platforms.
The below code snippet shows the download method.
[JS]
function download() {
var canvas = $("#Chart1").ejChart("exportChart");
var dt = canvas.toDataURL();
this.rel='nofollow' href = dt;
}
Please let us know if you have any concern.
Thanks,
Jayavigneshwaran
Hi Dhirender,
Thanks for using Syncfusion product.
We have analyzed this. Currently chart can be exported as image only. And then printing the image can be done manually.
We have already logged task to export chart in excel format.
The below shows the step for saving the rendered chart as image.
From version 12.3.0.36 exporting is done without using any other libraries.
To export a chart, you have to render it in HTML5 canvas. This is done by setting the below option
[ASPX]
<ej:Chart ID="Chart1" runat="server" EnableCanvasRendering="True">
</ej:Chart>
And also the button/image to perform export should be place inside <a> anchor tag.
[HTML]
<a id="download" download="Chart.png" style="float: right; cursor: pointer;" >
<img src="../images/chart/export.png" title="Export Chart"/>
</a>
We have made a sample to export the chart rendered for your reference.
Find it form the below link
Sample is coded in Defalut.aspx page
The attached file contains export sample in both JS and ASP platforms.
The below code snippet shows the download method.
[JS]
function download() {
var canvas = $("#Chart1").ejChart("exportChart");
var dt = canvas.toDataURL();
this.rel='nofollow' href = dt;
}
Please let us know if you have any concern.
Thanks,
Jayavigneshwaran
Hello jayavigneshwaran,
How can i save this downloaded chart image in my local project folder. This code is working fine but the problem is it downloaded the image that I do not want to do. I want to save this chart image in my projects folder. Please help How to do that.
Hi Sunil,
Currently there is not support to achieve this. So a support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you have any concern.
Thanks,
Jayavigneshwaran