We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Scaling a saved chart?

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

3 Replies

SA Saradha Syncfusion Team August 6, 2009 05:15 AM UTC

Hi Mike,

The issue 'Series are not updated properly when we save the chart with Measure and Arrange calls' has been confirmed as a defect and has been logged as a defect report. The fix for this issue will be available in three weeks time. Thanks for bringing this issue to our notice.

As per our company policy we don't provide defect fix related information in Forum. Since the Forum is considered as a discussion venue for developers and not the primary source for support you can use your Direct Trac account for our further assistance and to keep track of this defect status.

Thank you for your interest in Syncfusion products.

Regards,
K. Saradha Devi


MB Mike Berriman August 6, 2009 11:14 PM UTC

This defect is not showing up in my "Open Issues" in Direct-Trac - is there something I need to do to be updated of it's status?


PP Prabhu P Syncfusion Team August 11, 2009 02:59 PM UTC

Hi Mike,

Currently we are maintaining all the issues in our internal bug tracking system which will not be available in Direct-Trac. We will get back to you with fix detils as soon as this issue gets fixed.

Thanks for your patience.

Regards,
Prabu


Loader.
Live Chat Icon For mobile
Up arrow icon