Board index » delphi » Teechart Printing - Overwritting chart axis when zoomed WHY!!!!

Teechart Printing - Overwritting chart axis when zoomed WHY!!!!

I am trying to write an application which allows a user to print out a
chart created using TeeChart.

The chart will have upto 10,000 points shown and prints fine. BUT if
you zoom in and then print the graph in this state the values/lines
etc print all over the legend and axis at the top and bottom of the
chart but not the sides ????

My code looks like this

procedure TfmChart.btnPrintClick(Sender: TObject);
var
Temp : TRect;
begin

Temp.Left := 1;
Temp.Right := 1;
Temp.Top := 1;
Temp.Bottom := 1;
   chtOffset.PrintMargins := temp;
   chtOffset.Title.Text.Add('Some text');
   chtOffset.PrintResolution := -100; // to get high resolution print
   chtOffset.PrintLandscape;
   chtOffset.Title.Text.Delete(1); //get rid of extra text just added

end

Any ideas as to why this does not work?
Am i missing a trick somewhere?

Thanks

Tim

 

Re:Teechart Printing - Overwritting chart axis when zoomed WHY!!!!


Hi Tim
You can set these properties to True before printing. WinNT and Win95B
allow clipping on metafiles. Win95A and 3.11 do not.  The printer / printer
driver
should support metafile clipping for this to work:

...
TeeClipWhenMetafiling := True;
TeeClipWhenPrinting := True;
chtOffset.PrintLandscape;

These global constants are default to False in the Delphi 3 version, and
to True in TeeChart Pro.

Regards
David Berneda
www.teemach.com

Tim Norton escribi en mensaje <34d35029.12937...@news.demon.co.uk>...

Quote
>I am trying to write an application which allows a user to print out a
>chart created using TeeChart.

>The chart will have upto 10,000 points shown and prints fine. BUT if
>you zoom in and then print the graph in this state the values/lines
>etc print all over the legend and axis at the top and bottom of the
>chart but not the sides ????

>My code looks like this

>procedure TfmChart.btnPrintClick(Sender: TObject);
>var
>Temp : TRect;
>begin

>Temp.Left := 1;
>Temp.Right := 1;
>Temp.Top := 1;
>Temp.Bottom := 1;
>   chtOffset.PrintMargins := temp;
>   chtOffset.Title.Text.Add('Some text');
>   chtOffset.PrintResolution := -100; // to get high resolution print
>   chtOffset.PrintLandscape;
>   chtOffset.Title.Text.Delete(1); //get rid of extra text just added

>end

>Any ideas as to why this does not work?
>Am i missing a trick somewhere?

>Thanks

>Tim

Other Threads