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
close icon

Saving Chart as an image?

Hello,

I'm in the middle of building an application. Can we save the chart as an image? Or is there any workaround?

8 Replies

MK Magesh Kumar Krishnan Syncfusion Team December 31, 2014 01:21 PM UTC

Hi Jestin,

Currently we do not have support to save the chart as an image in Xamarin.Forms, also we have logged this in our feature management system, this feature will be available in any of our upcoming release. We are trying for a feasible workaround to achieve your requirement and we will update you the status in one business day  (2nd Jan 2015).

Thanks,
Magesh Kumar K


SB Suresh B Syncfusion Team January 2, 2015 11:34 AM UTC

Hi Jestin,

We are glad to let you know that we have achieved your requirement by a workaround. Please find the workaround sample from the following attachment, in the sample, we have written custom renderer for each platform to save the chart as an image. You can save the image by using SaveImage method in CustomChart class.  However, as we informed earlier we will provide this support in control level in any of our upcoming releases.

Please find the sample in the below location: 

http://www.syncfusion.com/downloads/support/directtrac/117856/ChartSample1681995556.zip

 

Please let us know if you require further assistance on this.

Thanks,

Suresh B




DN Dnyani May 22, 2015 06:05 AM UTC

Hi Suresh,
I am able to run this sample successfully on android platform but captured images are showing black only. any suggestions? then please update asap. 

Thanks



YP Yuvaraj Palanisamy Syncfusion Team May 22, 2015 12:56 PM UTC

Hi Dnyani,

Thanks for using Syncfusion products,

We have analyzed the reported issue and we are not able to reproduce the issue in our side. Could you please provide some more information about this issue like version of Xamarin.Forms, version of Syncfusion Xamarin Studio, and device name. Also in Vol 1 2015 release(13.1451.0.26), we have provided this support in control level, you can use the following code snippet to save the chart as an image,

sfChart.SaveAsImage(“File_Name”);


Please let us know if you require further assistance on this.

Thanks,
Yuvaraj P


DN Dnyani May 25, 2015 10:38 AM UTC

Hi Yuvraj,

I tried with given code snippet but it's not working. Can you send me full example


YP Yuvaraj Palanisamy Syncfusion Team May 25, 2015 01:33 PM UTC

Hi Dnyani,

We have prepared a sample to save the chart as an image. Please find the sample from the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/117856/SaveAsImage-1823860475.zip

Please let us know if you require further assistance on this.

Thanks,
Yuvaraj P


MZ Mark Zhukovsky March 2, 2017 02:55 PM UTC

Hi, using latest ver of Xamarin Forms and SyncFusion, why does SaveAsImage() do nothing in UWP? Would be ideal if GetStream() worked but it states in documentation that's only available for Android and iOS...please help.


DA Devi Aruna Maharasi Murugan Syncfusion Team March 3, 2017 11:23 AM UTC

Hi Mark, 
  
Thanks for contacting Syncfusion Support. 
  
We have achieved your requirement by using CustomRenderer with ChartDependencyService for UWP. We have prepared a demo sample based on this requirement and it can be downloaded from below link, 
  
  
Regards, 
Devi 




Loader.
Live Chat Icon For mobile
Up arrow icon