Hi TeeChart Team,
I have a question on axis positioning. It's quite difficult for me to explain in text without a picture, so I have uploaded a picture in which I have carefully annotated my observations and doubts.
In summary, I don't know how to reserve space for CUSTOM axis's labels. I know that if I use MarginLeft property and set it to a rather large value, I can reserve enough space for custom axis's labels. But I am not allowed to to so, since reserving marginleft in this way creates a large redundant area to the left of the DEFAULT Axes.Left axis. So my guess is that margin left really just affects the default axis Axes.Left and has no effect on my custom axis (why?!).
What I need to do is just to align the custom axes I create with the default axis Axes.Left, instead of the default behavior that aligns custom axes with the left edge of Axes.Left's labels!
Please have a look at the picture I uploaded to understand my point. The file is named:
"Axis alignment and margin reservation.jpg"
Thank you,
Huy
Axis alignment and margin reservation
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 Narcís,
Yes. This topic does bring me a clear idea of what to do.
The only thing left is that I can't call "MaxLabelsWidth"! The reason is calling this BEFORE the chart is drawn, makes the function return incorrect result instead of the maxlabelswidth.
In another post, you suggested that we first have to redraw the chart, so that the function works. However, this is not possible, since my data size is rather large and also, redrawing the chart even for a small data set causes a flicker.
I understand why you don't provide the method to return the result before the axis is draw. That's perhaps because of the ability of the chart to override axis labels whenever the labels are requested (as in GetAxisDrawlabel). But is there any feasible way for me to get the length of my axis label without having to first call to redraw chart?
Yes. This topic does bring me a clear idea of what to do.
The only thing left is that I can't call "MaxLabelsWidth"! The reason is calling this BEFORE the chart is drawn, makes the function return incorrect result instead of the maxlabelswidth.
In another post, you suggested that we first have to redraw the chart, so that the function works. However, this is not possible, since my data size is rather large and also, redrawing the chart even for a small data set causes a flicker.
I understand why you don't provide the method to return the result before the axis is draw. That's perhaps because of the ability of the chart to override axis labels whenever the labels are requested (as in GetAxisDrawlabel). But is there any feasible way for me to get the length of my axis label without having to first call to redraw chart?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi huy,
In that case you may be interested in what was discussed on this thread. Please notice that it is quite long, I'd recommend you to read it entirely. At least, read the messages posted from the end of 2006.
Hope this helps!
In that case you may be interested in what was discussed on this thread. Please notice that it is quite long, I'd recommend you to read it entirely. At least, read the messages posted from the end of 2006.
Hope this helps!
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 |