I havenβt done much with AChartEngine, but a quick look at the source code suggests that you can extend BarChart to accomplish what you need.
Look at the getLabel(double label) method located in AbstractChart ( BarChart extends XYChart , which extends AbstractChart on its own).
protected String getLabel(double label) { String text = ""; if (label == Math.round(label)) { text = Math.round(label) + ""; } else { text = label + ""; } return text; }
I would start with something naive to understand how this works out; for example, just add "%" to the result above:
@Override protected String getLabel(double label) { return super.getLabel(label) + "%"; }
The only thing I'm not too sure is whether the same method is used to create labels for the X axis. If this happens, you probably need to do something a little smarter to enable it only for the axis you are interested in.
source share