I've been using the Chart.save() method, which works fine based on the size of the chart, but I'd like to try to save the chart at a particular pixel size, and am having some problems.
What I've tried is this :
double width = chart1.ActualWidth;
double height = chart1.ActualHeight;
chart1.Measure(new Size(1000, 1000));
chart1.Arrange(new Rect(0, 0, 1000, 1000));
chart1.Save(parameters[0]);
Which kind of works. I have tried settings the Width and Height member of the chart, but they have little effect.
Firstly it doesn't resize fully in the image (output image is 634x1000).
Secondly, the series are not drawn correctly in the image. If you look at the attachment, The base of the columns should be at 0, and in fact the line and the circles are the same series, the circles being adornments to the line chart.
Can you suggest a way that I can get a chart saved image out at a given size, regardless of the chart size on screen? Basically, the charts in my software are quite small, but I'd like to be able to generate nice images of a bigger size as output png's. I'd much prefer to do it without resizing the output image, because that will just look bad.
Any ideas?
chart_8a9502b3.png