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.
Unfortunately, activation email could not send to your email. Please try again.

GetStream() returns empty image

Thread ID:

Created:

Updated:

Platform:

Replies:

130724 May 29,2017 06:02 AM Jun 1,2017 08:11 PM Xamarin.Forms 3
loading
Tags: SfChart
Simon
Asked On May 29, 2017 06:02 AM

The GetStream() method returns an image with only the legend showing when the chart has EnableAnimation = true set.

This workaround works fine tho:

            Chart.Series[0].EnableAnimation = false;
            Stream stream = Chart.GetStream();
            Chart.Series[0].EnableAnimation = true;

I think this should get fixed.

Parthiban Sundaram [Syncfusion]
Replied On May 30, 2017 07:26 AM

Hi Simon,

Thanks for using Syncfusion Products.

We would like to inform you that it is an expected behavior in SfChart and while animating, the animated segment alone will be saved and the chart is exported from animated segment.

For Exporting Chart, we suggest you use the SaveAsImage() in SfChart to save the image.

Reference link: https://help.syncfusion.com/xamarin/sfchart/export  

Please let us know, if you need further assistance on this.

Regards,
Parthiban

Simon
Replied On May 30, 2017 07:40 AM

Hi, thanks for your response.

Using SaveAsImage() was my first approach, but i had problems getting access to the file on iOS. The documentation said:

"iOS – The image will be saved inside the “Photos/Album” directory."

but i didn't find a way to access this file.

Additionally the image file was just another step to load the image into a MemoryStream and draw it into a pdf. So the GetStream() approach seemed more convenient.

Parthiban Sundaram [Syncfusion]
Replied On June 1, 2017 08:11 PM

Hi Simon,

Thanks for the update.

Regarding “GetStream() method returns an image with only the legend showing when the chart has EnableAnimation = true

We will check this internally and as of now you can overcome this using the below code snippet as per your previous update.
 
  
            Chart.Series[0].EnableAnimation = false; 
            Stream stream = Chart.GetStream(); 
            Chart.Series[0].EnableAnimation = true; 

Please let us know, if you need further assistance on this.

Regards,
Parthiban S
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;