Any idea why I cannot read the maximum value from a custom axis??
Hugh
CustomAxis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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.......
thanks,
Hugh
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.......
thanks,
Hugh