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
close icon

Printing

I have labels that I have inserted on the chart. When I use the tool bar to print out the chart, the labels do not display.

How can I print the chart with labels or pictures that I have added on top of the chart?

p.s. Thanks for all your help!


6 Replies

MS Manimala S Syncfusion Team April 24, 2009 10:04 AM UTC

Hi Lee,

Thanks for your continuous support.

To make the label or any other control to be visible in the print or preview you have to include the below line of code in your form_load() event.

//Code
this.chartControl1.Controls.Add(this.label3);

Kindly, let me know if it helps.

Thanks,
Manimala.




ML Mia Lee April 28, 2009 10:09 PM UTC

Thanks!

Quick question.. how can I print the chart w/o the toolbar being printed with it?



MS Manimala S Syncfusion Team April 29, 2009 11:28 AM UTC


Hi Lee,

It is possible to print the chart without using the toolbar.

Here is the sample code to do that.

Size chartSize = new Size((int)Math.Ceiling(this.ChartWebControl1.Width.Value),
(int)Math.Ceiling(this.ChartWebControl1.Height.Value));
Bitmap bmp = new Bitmap(chartSize.Width, chartSize.Height);
ResourceHolder printHohlder = new ResourceHolder(this.Page);
ImageResourceInfo iri = new ImageResourceInfo(bmp, ImageFormat.Png, this.ChartWebControl1.Parent.ID);

this.ChartWebControl1.Draw(bmp);
printHohlder.AddResource(iri);

ChartUtils.PrintImageOnClient(this.Page, printHohlder.GetResourceUrl(iri));


For more information on this kindly, have a look at the following link.

http://help.syncfusion.com/ug_71_new/chart/HowToPrintTheChartWithoutUsingToolbar.html


Thanks,
Manimala.




ML Mia Lee May 5, 2009 06:17 PM UTC

thanks!



AD Administrator Syncfusion Team May 20, 2009 03:33 PM UTC

Does this same example apply wo Winforms? I can't find a ResourceHolder or ImageResourceInfo for Syncfusion.Windows.Forms.Chart.

Thanks


ML Mia Lee May 20, 2009 03:37 PM UTC

Thanks, figured it out.

Loader.
Live Chat Icon For mobile
Up arrow icon