We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to generate chart image in background ?

I have some initial data and need to generate image file containing chart based on this data.
So I need to generate chart image in background without displaying any chart control.
I see that every Web, Desktop or Mobile Syncfusion's product contains Chart control.
But they are visual controls, while I need no visuality at all.
Is it possible to perform such task with the help of some Syncfusion product ?

Oleg Subachev

1 Reply

SK Sanjith Kesavan Syncfusion Team December 29, 2015 11:38 AM UTC

Hi Oleg Subachev,
We have analyzed your query. Please find the response for your query in the below table.

Platform

Response

Java script

We can achieve your requirement in javascript by setting the display property of the <div> as “none”. Please find the below code example.




Now as per your requirement visibility of the chart is none. In the DOMCotentLoaded event we have written the following code.



In the above code we have exported the chart to image. We have prepared the sample as per your requirement. Please find the sample from below location.

Sample Link: http://www.syncfusion.com/downloads/support/forum/121546/ze/Script1739628175


Window Form

We can achieve your requirement in window form by saving the chart image in the form load event without binding the chart control to the form. Please find the below code example.




So when the form is loaded then chart is exported to image and chart is not added in the form. We have prepared the sample as per your requirement. Please find the sample from below location.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/121546/ze/WindowsForms-1611584201


WPF

In WPF platform also we can perform able to export the chart even if the chart is not displayed. We have prepared the sample as per your requirement. Please find the sample from below location.

Sample Link: SfChartToImage



Please let us know if you have any concern.

Regards,
Sanjith K.

Loader.
Live Chat Icon For mobile
Up arrow icon