mChart.getXAxis().setValueFormatter(new IAxisValueFormatter() {
@Override
public String getFormattedValue(float value, AxisBase axis) {
String val =null;
try {
val =xStringValue.get((int) value);
}catch (IndexOutOfBoundsException e) {
axis.setGranularityEnabled(false);
}
return val;
}
});
网友评论