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

RadChart.Save() does not save charting data

1 Answer 96 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
xav
Top achievements
Rank 1
xav asked on 27 Dec 2013, 10:26 PM
I am using an older version of the RadControls (2011.3.1115.40). I would like to save the charts to jpeg format. I have a button on the form which invokes the following event: 

        protected void btnSaveChar_OnClick(object sender, EventArgs e)
        {
            RadChart1.Save(Server.MapPath("~/files/chart.jpg"), System.Drawing.Imaging.ImageFormat.Jpeg); 
        }

This definitely saves the chart, but its a blank chart with the label "There is no or empty series". What do I need to do to save the chart as it is displayed on the webform? 

Thanks! 

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 30 Dec 2013, 03:43 PM
Hello Xav,

Thank you for writing.

I tested the method you are using but there were no issues on my side. The chart was saved to the image with all the data inside it. I tested the case in both bound and unbound mode. An alternative approach you can try is the DrawToBitmap method. This method is inherited from Control and can be used for any control, here is how use it:
Bitmap bmp = new Bitmap(this.radChart1.Width, this.radChart1.Height);
this.radChart1.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
bmp.Save(@"C:\chart.jpg");

If this does not work as well, I would kindly ask you to send me your project or an example where you are able to reproduce this behavior so I can investigate the issue further.

I hope this will be useful. Should you have further questions, I would be glad to help.

Regards,
Ivan Petrov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Chart (obsolete as of Q1 2013)
Asked by
xav
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or