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

GetStream() returns empty image

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.

3 Replies

PS Parthiban Sundaram Syncfusion Team May 30, 2017 11:26 AM UTC

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


SI Simon May 30, 2017 11:40 AM UTC

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.


PS Parthiban Sundaram Syncfusion Team June 2, 2017 12:11 AM UTC

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
 


Loader.
Up arrow icon