Difference between revisions of "FMXTutorial14"

From Steema Software Reference Wiki
Jump to: navigation, search
(Print previewing several Charts on one page)
Line 140: Line 140:
© 1998-2014 Steema Software SL. All rights reserved.
© 1998-{{CURRENTYEAR}} Steema Software SL. All rights reserved.

Revision as of 15:50, 15 April 2016


Contents page
Previous | Next

Tutorial 14 - Printing Charts

Standard Printing

TeeChart Pro offers standard print methods to print the Onscreen Chart 'as is' to the Printer.

Simple Print command

To print a Chart use the Print method. This will print the chart as it appears onscreen.



Print Orientation

The PrintPortrait and PrintLandscape methods allow you to print those orientations even if they are not defined as the default. The default orientation will take effect again after the print is complete. Default Orientation can be changed using the PrintOrientation method. The Orientation method will not print for you. You must run Print after changing the PrintOrientation.


With Chart1 do

Print Preview

The PrintPreview window will show you how the Chart will appear when printed. You may modify print parameters in the Print Preview window before sending the job to the Printer. To call PrintPreview run:

// Add the teeprevi unit to the Uses part of your project

Print Resolution

Print Resolution refers to the level of Chart detail to be printed and is not to be confused with printer resolution which is defined with your Printer setup in Windows' Print management. TeeChart Print Resolution defines the amount of TeeChart detail to be included in the printed Chart, its Axis scale detail, Gridline frequency, etc. The value range is a percentage from 0-100%.


//this will use screen resolution
Chart1.PrintResolution := 0;
//this will use more printer resolution
Chart1.PrintResolution := 100;

Greyscale printing

When printing to Greyscale printers you should take care that the colours of the Chart are easily distinguishable when translated to shades of grey. To help, you could add Brush styles to the Chart Series to more easily distinguish Series when printed.

Extended Printing methods


Use the PrintPartial method to Print a Chart to a Printer with Control over the dimensions and location on the printed page. PrintPartial doesn't expel the page thus allowing you to print multiple Charts per page. You need to call Delphi's BeginDoc and EndDoc methods to open and close the Printer.


 //Add the Printer unit to the Uses section of your project

Printing multiple page Charts

For information about printing multipage Charts (where MaxPointsPerPage is less than the total point quntity) please see the Chart paging tutorial.

Print previewing several Charts on one page

The Print Preview panel now accepts more than one Chart (or TeePanel). Chart positions are controlled setting the PrintMargins property. Use the TeePreviewPanel1.Panels collection to manage the Charts on the Preview page.

  { change margins }


  { add to preview }

Only one Chart may be mousedrag moved on the Previewer at one viewing so you must disable the 1st Chart from view to enable drag repositioning of the 2nd Chart. The TeeChart demo project includes a page with the following code:

  With TeePreviewPanel1 do
    if CheckBox1.Checked then Panels.Add(Chart1);
    if CheckBox2.Checked then Panels.Add(Chart2);

By selecting one or another of the 2 Checkboxes (when both are showing only the first Chart is moveable) you may reposition both the Charts on the page via mousedrag.



© 1998-2020 Steema Software SL. All rights reserved.