Page 1 of 1

MaximumOffset and MinimumuOffset

Posted: Thu Mar 02, 2006 11:46 am
by 9339785
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

Posted: Thu Mar 02, 2006 12:17 pm
by narcis
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);

Posted: Thu Mar 02, 2006 1:53 pm
by 9339785
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

Posted: Thu Mar 02, 2006 2:35 pm
by narcis
Hi Franck,

Did you looked at the "Isometric Axis" example at the TeeChart features demo? That example already considers axes offset.

Posted: Thu Mar 02, 2006 3:19 pm
by 9339785
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.

Posted: Wed Mar 08, 2006 11:46 am
by Pep
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;