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

Chart to bitmap

3 Answers 86 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vladimir
Top achievements
Rank 1
Vladimir asked on 30 May 2013, 01:50 PM
Hi Telerik Team,

Thanks again for the work you have been doing.

I have a data series that is used to display a chart in the app.
I would like to render this data series into bitmap but I don't wanna to show the new chart.(It is a little bit different)
Finally I would like to generate a Bitmap on the fly and upload it to the Skydrive.
What Is the best way to achieve this?

best regards,
Vladimir.

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 31 May 2013, 11:47 AM
Hello Vladimir,

You can use WriteableBitmap to create a snapshot of your chart like this:

WriteableBitmap bmp = new WriteableBitmap(this.chart, null);
bmp.Invalidate();
bmp.SaveJpeg();
For more info on how to use SaveJpeg() see here.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Vladimir
Top achievements
Rank 1
answered on 31 May 2013, 12:02 PM
Hi Victor,

Thanks for the answer.
The things is that I don't have a UI chart control.
I only have the dataseries and want to generate chart in memory and save it into a bitmap file.
Is it possible?

Regards,
Vladimir.
0
Victor
Telerik team
answered on 03 Jun 2013, 08:28 AM
Hi Vladimir,

Yes, of course, you don't need any xaml to create the chart. Just initialize a RadCartesianChart object in C# and use WriteableBitmap to render it to a bitmap.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Victor
Telerik team
Vladimir
Top achievements
Rank 1
Share this question
or