Hi,
When showing both right and left axes, the TChart does not attempt to harmonise grid lines such that they fit both left and right axes. In order to do this programmatically, I need to calculate the number of left axis increments and use this to optimize the right axis maximum and minimum.
But the axis maximum property returns the maximum of its dependent series rather than the maximum value that the axis accommodates. How can I get at the maximum accommodated axis value?
Thanks for any advice.
Regards
Toreba
harmonising right and left axis grid increments
Re: harmonising right and left axis grid increments
Hi Toreba,
This sounds pretty similar to what was discussed here, isn't it?
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
This sounds pretty similar to what was discussed here, isn't it?
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: harmonising right and left axis grid increments
Yeray,
It's not clear that the code example given there is going to help. It seems to use some mysterious integer constants, and methods such as CalcPosValue are not described in the help file, which simply says 'internally used to speed up axis calculations'.
I have one series on the left axis and another on the right axis, and so scales are completely different for the two series, but for neat display I want to calculate right axis extents and increment so that the grid lines associated with each axis align. To simplify what I am asking, is there a method which returns the chart value at each end of the axis, i.e. the axis maximum and minimum, not the maximum and minimum values of dependent series?
Regards
Toreba
It's not clear that the code example given there is going to help. It seems to use some mysterious integer constants, and methods such as CalcPosValue are not described in the help file, which simply says 'internally used to speed up axis calculations'.
I have one series on the left axis and another on the right axis, and so scales are completely different for the two series, but for neat display I want to calculate right axis extents and increment so that the grid lines associated with each axis align. To simplify what I am asking, is there a method which returns the chart value at each end of the axis, i.e. the axis maximum and minimum, not the maximum and minimum values of dependent series?
Regards
Toreba
Re: harmonising right and left axis grid increments
Hello Toreba,
Note the axes minimum and maximum are calculated during the drawing process. So you may need to force a chart repaint (Chart1.Draw) before accessing them.toreba wrote:To simplify what I am asking, is there a method which returns the chart value at each end of the axis, i.e. the axis maximum and minimum, not the maximum and minimum values of dependent series?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: harmonising right and left axis grid increments
Ah yes! Thank you!