Modification of axis labels prior to showing.
Posted: Sat Nov 29, 2003 3:22 am
I am using a TDateTime formatted bottom axis however I want to modify the format of the date/time display based on what was shown previously.
For example, if the previous bottom axis label was "1:00am 1 Mar", I want the next axis label to be "2:00am" and exclude the "1 Mar" because it is obviously we are still in the 1st of March. The same applies for years.
This effectively provides a change of date/time formatting when necessary and neatens up the whole bottom axis.
I have tried a whole range of things and 'OnGetAxisLabel' seemed to be the most applicable way of modifying the axis label text before drawing. However, I needed knowledge of the previous axis label text in order to make a decision and the 'OnGetAxisLabel' event iterates backwards through the axis labels which destroys the logic.
Can anyone make a suggestion as to how to do what I want in a proper manner. The TeeChart tool does'nt seem to provide as many hooks into the drawing process as I might like.
Regards, David Peacock.
[email protected]
For example, if the previous bottom axis label was "1:00am 1 Mar", I want the next axis label to be "2:00am" and exclude the "1 Mar" because it is obviously we are still in the 1st of March. The same applies for years.
This effectively provides a change of date/time formatting when necessary and neatens up the whole bottom axis.
I have tried a whole range of things and 'OnGetAxisLabel' seemed to be the most applicable way of modifying the axis label text before drawing. However, I needed knowledge of the previous axis label text in order to make a decision and the 'OnGetAxisLabel' event iterates backwards through the axis labels which destroys the logic.
Can anyone make a suggestion as to how to do what I want in a proper manner. The TeeChart tool does'nt seem to provide as many hooks into the drawing process as I might like.
Regards, David Peacock.
[email protected]