How to add x axis as datetime label in MPAndroidChart?
问题 I implemented line chart (MPAndroidChart library) for temperature report in my project.In X axis datetime should be plotted and Y axis temperature should be plotted. I just added datetime as string in X axis label but it's collapsed. So please anyone guide me. 回答1: Try the following. To set the X Axis XAxis xAxis = mChart.getXAxis(); xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); xAxis.setValueFormatter(new MyXAxisValueFormatter()); xAxis.setLabelsToSkip(0); Create a new class