最近帮助同学,使用MPAndroidChart 控件,在图表显示时候,

 

class  MyValueFormatter implements IValueFormatter {
    @RequiresApi(api = Build.VERSION_CODES.N)
    public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {
        DecimalFormat df = new DecimalFormat("#.00");
        return df.format(value);
        //return "10";
    }
}
新的内容
 
lineDataSet.setValueFormatter(new MyValueFormatter());

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2022-01-14
  • 2022-12-23
  • 2021-10-04
  • 2021-10-23
  • 2021-07-05
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案