I have a NumberAxis that is autoranging - so it's choosing the tick values for the axis based upon the data in the chart.
I want to force a particular tick value to appear regardless of the data - is there a way to achieve this ?
Is there a way to force a tick onto an Axis ?
Of course there is one:
Code: Select all
rangeAxis.setTickUnit(new NumberTickUnit(10));
That will put just that tick unit on. Is there a way to add that tick unit plus what are added by default ?angel wrote:Of course there is one:Code: Select all
rangeAxis.setTickUnit(new NumberTickUnit(10));
You can override refreshTicks - but that is painful because you have to duplicate the direction related layout code from NumberAxis.rlenard wrote:That will put just that tick unit on. Is there a way to add that tick unit plus what are added by default ?angel wrote:Of course there is one:Code: Select all
rangeAxis.setTickUnit(new NumberTickUnit(10));
What would be nice is to have a method to override which returns the tick values, then refreshTicks deals ith all the layout issues. The default method would generate the standard tick values.