It's possible to put a (vertically centered) title on the left axis. It's also possible to add a label placed to the left, at the maximum value.
I want to place a label/title above the axis. Actually, I have an arrow at the top of the axis and I would like to put the label above that.
Put axis label above left axis?
Re: Put axis label above left axis?
Hi,
You could use an Annotation tool for it.
You could use an Annotation tool for it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Put axis label above left axis?
Thanks. But how do I position it at that exact location? At the time I instantiate my axis/arrow, they have no coordinates set!
Re: Put axis label above left axis?
Hi,
You need the chart to be drawn at least once to retrieve getChartRect or the axis position.
You need the chart to be drawn at least once to retrieve getChartRect or the axis position.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Put axis label above left axis?
There is no event or similar that I can hook into to position the label? Or should I simply call setAutoRepaint(true) and refreshControl() and then position the label?
Re: Put axis label above left axis?
Hi,
I'm not sure it will work. In cases like this I remember to end up setting it at the chartPaint event, using some boolean to make sure I'm not creating and endless loop.
I'm not sure it will work. In cases like this I remember to end up setting it at the chartPaint event, using some boolean to make sure I'm not creating and endless loop.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Put axis label above left axis?
Thanks. I have a feeling it won't work, like you say. I believe I tried this in the past.
One problem is that I'd like my label to push down the axis from the top, so that it does indeed fit. This happens automatically when an axis label is present. In that case the entire axis is pushed to the right.
May the best approach is to modify the source code to get this desired feature?
One problem is that I'd like my label to push down the axis from the top, so that it does indeed fit. This happens automatically when an axis label is present. In that case the entire axis is pushed to the right.
May the best approach is to modify the source code to get this desired feature?
Re: Put axis label above left axis?
Hi,
Of course modifying the sources can be more accurate if you are always going to have this label on top of your axis.
Alternatively, if the axis will always have the same position, you can just find the appropriate Top and Left values to set for the Annotation tool and set them at the startup. In this option, you'll probably have to add some Top and/or Left Margins to the chart panel to leave some space for the Annotation.
Of course modifying the sources can be more accurate if you are always going to have this label on top of your axis.
Alternatively, if the axis will always have the same position, you can just find the appropriate Top and Left values to set for the Annotation tool and set them at the startup. In this option, you'll probably have to add some Top and/or Left Margins to the chart panel to leave some space for the Annotation.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |