Getting duplicate values at xAxis MPChart

后端 未结 3 755
心在旅途
心在旅途 2021-01-02 08:03

Right Now I am facing this issue. I am getting repeated values in xAxis the first one and the last one.And graph values are not according to the values at respective x-axis

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-02 08:05

    //set granularity to minimum value to ensure label does not give duplicate value
    lineChart.getAxisLeft().setGranularity(1f);
    lineChart.getXAxis().setGranularity(1f);
    lineChart.getXAxis().setGranularityEnabled(true);
    //also make sure you don't pass true as force parameter in below line please pass only false
    bottomAxis.setLabelCount(dateLabels.size(),false);
    

提交回复
热议问题