CustomAxis

TeeChart for ActiveX, COM and ASP
Post Reply
hugh
Newbie
Newbie
Posts: 33
Joined: Tue Jan 15, 2008 12:00 am

CustomAxis

Post by hugh » Mon May 12, 2008 4:41 pm

Any idea why I cannot read the maximum value from a custom axis?? :x

Hugh

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue May 13, 2008 11:43 am

Hi Hugh,

You may be making the Maximum call before the chart is painted and therefore axes properties calculated. Code below works fine for me. Using InternalRepaint call I'm forcint the chart being internally repainted so that axes have valid properties when retrieving them.

Code: Select all

Private Sub Form_Load()
    TChart1.Environment.InternalRepaint
    Me.Caption = CStr(TChart1.Axis.Custom(0).Maximum)
End Sub
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

hugh
Newbie
Newbie
Posts: 33
Joined: Tue Jan 15, 2008 12:00 am

Post by hugh » Tue May 13, 2008 12:42 pm

Hi Narcis,

I'm developing in Labview - using the internal repaint functionality as suggested creates me an "access violation at adress 010B0E16 in module Labview.exe - read of address 61745320" - so this solution does not work for me - any other suggestions??

anyway - using the internal repaint every time on an OnAxisDrawLabel creates unneccesary high computation load - should the repaint not be done internally once when an axis label changes - I dont understand this logic..... why cant they do it the same way they do it with top, bottom, left and right axis....... :cry: :cry: :cry:

thanks,

Hugh

Post Reply