VV
Venkata Vijayaraj B
Syncfusion Team
September 25, 2009 10:45 AM UTC
Hi Matt,
Please use the below code to save the whole Chart with Title and Legend in bmp format.
//Filename with the location where you want to save the image.
string fileName = Application.StartupPath + "\\ExportChart";
string exportFileName = fileName + ".bmp";
//Saving chartImage.
chartControl1.SaveImage(exportFileName);
Let me know if this meets your requirement.
Regards,
Venkat.
MD
Matthew Daniels
September 25, 2009 12:23 PM UTC
Hi Venkat
That looks like it will just save an exact copy of the chart - but I need to be able to specify the dimensions of the bitmap. Eg. my chart might be 640x480 pixels in size, but I might just want a thumbnail of 200 pixels wide.
VV
Venkata Vijayaraj B
Syncfusion Team
September 28, 2009 11:02 AM UTC
Hi Matt,
Sorry for the delay in responding.
We are not having support to mention the size of the image while saving Chart using SaveImage method, but this can be
done by using the following workaround.
Size currSize = chartControl1.Size;
chartControl1.Size = new Size(200, 200); // mention here the desired size.
chartControl1.SaveImage("MyChart.bmp");
chartControl1.Size = currSize;
Please let me know if this helps.
Regards,
Venkat.