MaximumOffset and MinimumuOffset

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

MaximumOffset and MinimumuOffset

Post by franckgar » Thu Mar 02, 2006 11:46 am

Hi,
How can I calculate the maximum and minimum of an axis by taking account the MaximumOffset and MinimumuOffset ? My problem is that MaximumOffset and MinimumuOffset are in pixel unit.

Thanks
Franck

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 Mar 02, 2006 12:17 pm

Hi Franck,

You may obtain that value using something like:

Code: Select all

  Chart1.Axes.Left.CalcPosPoint(Chart1.Axes.Left.IStartPos-Chart1.Axes.Left.MaximumOffset);
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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Thu Mar 02, 2006 1:53 pm

Thanks for you quick reply, but even with this I do not find the solution of my pb.
Let me explain.... I posted a message in the forum in October 2005 (title of the message : "Print proportional") because I could not print a propotional graph with the function "MakeIsoXYAxes()" that you described in the forum. I always had an error of 2% between axes, which is not acceptable for my customers.
This morning I found an explanation of this ... I'm using the properties ChartAxis.MinimumOffset and ChartAxis.MaximumOffset for all the axes but your function "MakeIsoXYAxes()" did not take them into account. Since this morning I tried to modify your function to correct the problem but whithout success.
So could you help me to insert MinimumOffset and MaximumOffset in your function MakeIsoXYAxes() ? I'm not sure to understand the variables IStartPos and IEndPos.
Franck

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 Mar 02, 2006 2:35 pm

Hi Franck,

Did you looked at the "Isometric Axis" example at the TeeChart features demo? That example already considers axes offset.
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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Thu Mar 02, 2006 3:19 pm

Yes the function I used is the function of the example of the TeeChart features demo but I'm sure it does n_o_t consider the MinimumOffset and MaximumOffset define on the axes.
When I set
LeftAxis.MinimumOffset := 0
LeftAxis.MaximumOffset := 0
BottomAxis.MinimumOffset := 0
BottomAxis.MaximumOffset := 0
then the function is correct, but when I set
LeftAxis.MinimumOffset := 10
LeftAxis.MaximumOffset := 10
BottomAxis.MinimumOffset := 10
BottomAxis.MaximumOffset := 10
then an error of 2% appears.

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Mar 08, 2006 11:46 am

Hi Frank,

to be considered you should change the code , for example in the Demo Features example :

Code: Select all

    With Horizontal do XRange:=Maximum-MaximumOffset-Minimum-MinimumOffset;

    With Vertical do YRange:=Maximum-MaximumOffset-Minimum-MinimumOffset;

Post Reply