Data points not showing in line chart

1.1k views Asked by At

I'm using iOS-Charts library to make charts in my project. I tried to plot some reading against dateTime stamp. I converted the date object to milliseconds in order to make it as a double value which the line chart accepts. When I tried this method blank graph appears with labels and without any data points. That is shown in below screenshot. enter image description here

When I printed those data points using print() function I got the following.

ChartDataEntry, x: 1453871669.0, y 24.54
ChartDataEntry, x: 1453869902.0, y 24.84
ChartDataEntry, x: 1453869846.0, y 24.84

I doubt that it's because the x value too hight no point appears. If my doubt right please provide a solution to rectify this. Thanks in advance.

1

There are 1 answers

1
Y.Bi On

Nice to meet you my friend, cause I meet the same problem as well.

ChartDataEntry, x: 1453871669.0, y 24.54
ChartDataEntry, x: 1453869902.0, y 24.84
ChartDataEntry, x: 1453869846.0, y 24.84

Looks like your data are in a descending order right? Unfortunately that is the problem.If you sort them in a ascending order,I think you can see them all.

Maybe it's a bug of Charts.