TChartAxis location in pixels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
beetle
Newbie
Newbie
Posts: 59
Joined: Fri Dec 12, 2003 5:00 am

TChartAxis location in pixels

Post by beetle » Wed Nov 07, 2007 5:28 pm

Hi,

I need a way to know the exact position of the begin and end of one
TChartAxis. In the case of the BottomAxis, It is not always possible to
get it from this sentence:

int xBegin = chart->BottomAxis->CalcPosValue(chart->BottomAxis->Minimum)

because there are cases in which that would be incorrect, like in the
case of a TBarSeries in the chart.

Is there any method I can use?

Thanks in advance.

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 Nov 08, 2007 10:28 am

Hi beetle,

Yes, you can use Chart1.Axes.Bottom.IStartPos and Chart1.Axes.Bottom.IEndPos. Please notice that those properties only have valid values when the chart has been drawn so, for example, you'd better use them in the OnAfterDraw event or make a Chart1.Draw call before retrieving.
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

beetle
Newbie
Newbie
Posts: 59
Joined: Fri Dec 12, 2003 5:00 am

Post by beetle » Thu Nov 08, 2007 12:41 pm

Hi Narcís,

That is exactly what I needed to calculate positions of some chart tools I have made.
Thank you very much.

Beetle.

Post Reply