Chart to bitmap

4 posts, 0 answers
  1. Vladimir
    Vladimir avatar
    15 posts
    Member since:
    Dec 2012

    Posted 30 May 2013 Link to this post

    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.
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 31 May 2013 Link to this post

    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.
  3. DevCraft banner
  4. Vladimir
    Vladimir avatar
    15 posts
    Member since:
    Dec 2012

    Posted 31 May 2013 Link to this post

    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.
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 03 Jun 2013 Link to this post

    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.
Back to Top
DevCraft banner