TeeChart for ActiveX, COM and ASP
-
guilz2010
- Newbie

- Posts: 63
- Joined: Thu Nov 25, 2010 12:00 am
- Location: Paris, France
Post
by guilz2010 » Tue Aug 23, 2011 1:55 pm
Hi,

- position.jpg (50.63 KiB) Viewed 6955 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
Guilz
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
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.
-
guilz2010
- Newbie

- Posts: 63
- Joined: Thu Nov 25, 2010 12:00 am
- Location: Paris, France
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