MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

LineData - labels not corresponding when too many entries

Open kusan-reveur opened this issue 10 years ago • 2 comments

Labels are not aligned with the entries when I have too many entries. Here is how I set the labels :

   for (int i = 0; i < data.length; i++) {
            entries.add(new Entry((int)(data[i][position]), (int)data[i][0])); //entry(y,x)
            labels.add(String.valueOf((int) data[i][0]));
        }

LineDataSet dataset = new LineDataSet(entries, item.getTitle().toString());
LineData plot = new LineData(labels, dataset);

As you can see the labels are the same as the x values. I got this problem around 30000 entries.

sans titre

(In this case, y and x are the same).

Also a constructor for LineData without labels would be nice (the X axis labels would then be just like the Y axis)

kusan-reveur avatar May 25 '16 11:05 kusan-reveur

i also met this problem, through some test, i guess it takes place when some entry's x repeat or the space of entry has big different

Sevenupboy avatar Jul 31 '16 15:07 Sevenupboy

Problem solved in v3.0.0-beta1

kusan-reveur avatar Aug 08 '16 08:08 kusan-reveur