Retrieve position of left axis

TeeChart for ActiveX, COM and ASP
Post Reply
guilz2010
Newbie
Newbie
Posts: 63
Joined: Thu Nov 25, 2010 12:00 am
Location: Paris, France

Retrieve position of left axis

Post by guilz2010 » Tue Aug 23, 2011 1:55 pm

Hi,
position.jpg
position.jpg (50.63 KiB) Viewed 6465 times
I would like to get the distance D (see my example) on a chart ?- How can I retrieve it ? D distance can change if numbers on left axis have more numbers !

Thanks for your help :wink:

Guilz

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Retrieve position of left axis

Post by Yeray » Wed Aug 24, 2011 10:40 am

Hello Guilz,

D is the Left Axis Position property. You could, for example:

Code: Select all

Private Sub TChart1_OnAfterDraw()
  TChart1.Canvas.Font.Size = 10
  TChart1.Canvas.Font.Bold = True
  TChart1.Canvas.Font.Color = vbBlue
  TChart1.Canvas.TextOut TChart1.Axis.Left.Position, 100, "My label"
End Sub
Note that this property needs the chart to be drawn to have a valid value.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

guilz2010
Newbie
Newbie
Posts: 63
Joined: Thu Nov 25, 2010 12:00 am
Location: Paris, France

Re: Retrieve position of left axis

Post by guilz2010 » Wed Aug 24, 2011 11:19 am

Thank you Yeray - I was not aware that property TChart1.Axis.Left.Position could be read only after AxTChart_OnAfterDraw event

Guilz

Post Reply