Mpandroidchart Bar Chart Values
I've been reading through the documentation for MPAndroidChart (using v3.0.1) and I can't seem to find a way to remove the labels on the bars I would like to hide the values that
Solution 1:
Simply create a new class and let it implement the IValueFormatter
and return whatever you want to be displayed from the getFormattedValue
(...) method like below.
publicclassMyValueFormatter implements IValueFormatter
{
@Override
public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler){
return"";
}
}
BarDataSet set = newBarDataSet(entries, "");
set.setValueFormatter(newMyValueFormatter());
set.setColor(Color.rgb(155, 155, 155));
set.setValueTextColor(Color.rgb(155, 155, 155));
You can find out more here.
Post a Comment for "Mpandroidchart Bar Chart Values"