Using different x-axis labels for n rows in a graph

Therefore, I use MPAndroidChart as a library to view graphs in my application. Now I wanted to make LineGraph a few lines (n). The problem is that these lines do not have the same X axis labels, and I did not find a solution to place the X axis labels relative to the records. In addition, a new line begins with a value of x 0. Therefore, my lines do not fill the entire area of ​​the chart. Because when I have two lines of 6 records each, the labels of the X axis are 12. And so the lines end in half the chart.

How to solve this?

LineGraph Example

+4
source share
1 answer

, : https://github.com/PhilJay/MPAndroidChart/blob/master/MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartActivity2.java

, , LineChart x ( Y, ). . , XAxis.java YAxis.java

, , x ( min/max x).

" >

x y y, y, . Y , , , .

+4

Source: https://habr.com/ru/post/1615007/


All Articles