This is a migrated thread and some comments may be shown as answers.

Export Xamarin Chart to pdf

3 Answers 111 Views
Chart - Xamarin.Android
This is a migrated thread and some comments may be shown as answers.
Gord
Top achievements
Rank 1
Gord asked on 08 May 2015, 02:39 PM

Hi,

If we were building charts either just for Xamarin Android or using Xamarin forms, is there a way to export the chart to a pdf or image file?

 Thanks

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 May 2015, 10:16 AM
Hi Gord,

The chart itself does not expose such functionality. You can find the task of saving a view as image discussed in the first reply in this Stack Overflow thread.

Best regards,
Ves
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Davide
Top achievements
Rank 1
Iron
answered on 24 Jul 2020, 03:08 PM

Thanks Ves,
I'm new to Telerik and I would like to know if there are some updates or different ways to obtain the same goal (since you replied to this post in 2015).

In addition, is the "chart-to-image" exporting feature planned in future release of Telerik for Xamarin Forms?

0
Lance | Manager Technical Support
Telerik team
answered on 24 Jul 2020, 03:45 PM

Hello Davide,

Go to my Custom Xamarin Demos repository on GitHub. Scroll down until you see my Render Image example.

In the Render Image Example's README, you will find instructions on how to get a PNG or JPG (with PDF support) from a Xamarin.Forms UI element by calling a simple method:

await DependencyService.Get<IRenderService>().RenderAsync(RenderEncodingOptions.Jpeg);

This gives you a byte array that you can do whatever you want with (i.e. save to a file, send to an API, anything).

Feature Request

As far as knowing when such a feature is officially added, you can click the Follow button in the Feature Request that you already commented on.  At this time the Feature Request is marked as Unplanned. You'll be notified if/when the item 's status changes. 

For transparency, I will reply to that Feature request with the same information I provided about so that developers can see who to do this themselves without needing to wait for a feature to be implemented.

Regards,
Lance | Manager - Technical Support
Progress Telerik

Tags
Chart - Xamarin.Android
Asked by
Gord
Top achievements
Rank 1
Answers by
Ves
Telerik team
Davide
Top achievements
Rank 1
Iron
Lance | Manager Technical Support
Telerik team
Share this question
or