lecho / hellocharts-android

Charts library for Android compatible with API 8+, several chart types with scaling, scrolling and animations 📊
Apache License 2.0
7.43k stars 1.61k forks source link

Not able to draw a proper Linear graph where X is date timestamp #461

Open l2dev opened 6 years ago

l2dev commented 6 years ago

Graph looks okay when I draw it with graphView http://prntscr.com/hjg501 (tested with plot.ly: http://prntscr.com/hjgiim)

And then graph looks bad when using hellochart/mpchart:

Hellochart: http://prntscr.com/hjg8fa

MPChart: http://prntscr.com/hjghbb

My dataset on both graphs is this (X, Y):

1512488280000   1.200000048
1512488310000   1.200000048
1512488346000   1.200000048
1512488370000   3.599999905
1512488400000   1.200000048
1512488430000   1.200000048
1512488460000   1.200000048
1512488490000   1.200000048
1512488524000   1.200000048
1512488550000   6
1512488580000   1.200000048
1512488612000   1.200000048
1512488646000   1.200000048
1512488674000   3.599999905
1512488702000   1.200000048
1512488730000   1.200000048
1512488760000   6
1512488790000   1.200000048
1512488820000   1.200000048
1512488850000   1.200000048
1512488880000   2.400000095
1512488910000   1.200000048
1512488940000   1.200000048
1512488970000   1.200000048
1512489000000   1.200000048
1512489030000   1.200000048
1512489060000   12
1512489090000   1.200000048
1512489126000   13.19999981
1512489150000   7.199999809

I see that in hellochart and mpchart graphs look the same, while in graphview it shows properly, so I must be doing something wrong then...

Is there a way to make it work?