Having a chart displayed with a System.Windows.Forms.DataVisualization.Charting.Chart
control in a .Net 4.0 WinForms application, can I save its render into a picture file?
Asked
Active
Viewed 5.1k times
2 Answers
26
How about the Chart.SaveImage()
method?

CodeCaster
- 147,647
- 23
- 218
- 272
-
1Thanks. I haven't ever been using the Chart control before and have somehow missed the method while searching. – Ivan Jun 02 '12 at 18:56
25
You can use the code below by passing proper ChartImageFormat.*:
this.chart1.SaveImage("C:\\mycode\\mychart.png", ChartImageFormat.Png);
Also look this SO if you met any problem: Save Image Using .net Chart and Saving higher resolution charts without messing up the appearance

Community
- 1
- 1

AvkashChauhan
- 20,495
- 3
- 34
- 65