How to Scale chart into a rectangle to fit the printer page.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HughM
Newbie
Newbie
Posts: 4
Joined: Mon May 21, 2007 12:00 am

How to Scale chart into a rectangle to fit the printer page.

Post by HughM » Thu Jan 24, 2008 2:28 pm

Can you show me how to print a chart from a window of user defined size to fit the page of the printer. We need to make the chart.Print(Rectangle) to use System.Drawing.Printing.PageSettings bounds rectangle to print from the chart, as we have our own printer preview screens and custom information etc need to be added before printing.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 24, 2008 3:40 pm

Hi HughM,

What about doing something like the example I posted here?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

HughM
Newbie
Newbie
Posts: 4
Joined: Mon May 21, 2007 12:00 am

Need a more generic solution

Post by HughM » Mon Jan 28, 2008 2:17 pm

The example posted in the link does not solve our problem. Print preview is only a constraint in our environment, in fact we use the TChart1.Print(Rectangle) as shown in the link. The problem is scaling for example 1) a maximized window containing the chart prints well on my machine, but a resized window containing the chart only prints partial chart. 2) Different screen resolutions produce different print outputs. I do not clearly understand the conversion factors from view to print.

The solution I am expecting is a generic nature of printing. A Chart print from a view should always fit the printer page on all circumstances.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 29, 2008 11:33 am

Hi HughM,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

HughM
Newbie
Newbie
Posts: 4
Joined: Mon May 21, 2007 12:00 am

Issue resolved.

Post by HughM » Thu Jan 31, 2008 3:43 pm

Created an example project to reproduce the problem and found that tchart is printing exactly the way I asked for " A Chart print from a view should always fit the printer page on all circumstances" for resized window and with different screen resolutions.
Thanks for your help anyways.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 31, 2008 6:15 pm

Hi HughM,

Don't mention it! I'm glad to hear you could solve the problem.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply