Fix crash with mpandroidchart 3.0pre (master)
This commit is contained in:
parent
478782998e
commit
e5d178b315
|
@ -735,10 +735,10 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFormattedValue(float value, AxisBase axis) {
|
public String getFormattedValue(float value, AxisBase axis) {
|
||||||
if (xLabels == null) {
|
int index = (int) value;
|
||||||
|
if (xLabels == null || index >= xLabels.size()) {
|
||||||
return String.valueOf(value);
|
return String.valueOf(value);
|
||||||
}
|
}
|
||||||
int index = (int) value;
|
|
||||||
return xLabels.get(index);
|
return xLabels.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue