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

Saving chart to file from chart.GetAsStream ()

Thread ID:





141650 Dec 24,2018 05:16 PM UTC Dec 26,2018 12:43 PM UTC Xamarin.Android 2
Tags: SfChart
Asked On December 24, 2018 05:16 PM UTC


i am working on sharing chart image in Xamarin.Forms
everything good if i use SaveAsImage and then share this file. But i don't like it is saving to /pictures and trying to
save it in different directory 
i was trying to use BitmapFactory.DecodeStream (chart.GetAsStream()) ,but bitmapfactory returns null
may somebody give me a hint, how can i save image from this stream ?


Replied On December 24, 2018 06:08 PM UTC

solved.  with seek to begin

var stream = chart.GetStream();
stream.Seek(0, System.IO.SeekOrigin.Begin);
Bitmap bmp = BitmapFactory.DecodeStream(stream);

Michael Prabhu M [Syncfusion]
Replied On December 26, 2018 12:43 PM UTC

Hi Ilya, 
Greetings from Syncfusion. We are glad you have solved this and the method you used is the efficient way to use. Let us know if you need any other assistance from us. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon