I have a bar graph displaying some percentages (10%, 50%, 40%). The tickUnits displayed on the y-axis are 0%, 5%, 10%, 15%, ... ,i.e.: incrementing by 5%.
Is there any way I can modify the tickUnits to increment by 10%, as I know all the percentages I have to display are multiples of 10.
This is the code where I think the change should be but I'm not too sure:
Code: Select all
DecimalFormat chartDecimalFormat = new DecimalFormat("0%");
rangeAxis.setNumberFormatOverride(chartDecimalFormat);
rangeAxis.setRange(0.0, 1.0);
rangeAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits());