Mpandroidchart: Managing timestamps in LineTimeChart

Created on 25 Aug 2016  路  2Comments  路  Source: PhilJay/MPAndroidChart

I want to add the following sort of data to the newly introduced timeseries chart.

Value :  50.0   at   1472112259
Value :  49.0   at   1472112294
Value :  50.0   at   1472112329
Value :  50.0   at   1472112360
Value :  50.0   at   1472112392

The following data will be fetched from the array.
Right now, I guess there is some mess up with the timestamps.
Here is the complete code: https://gist.github.com/utkarshns/e1723dcc57022fcd392bc3b127b6c898

Most helpful comment

The issue is primarily because of the float datatype unable to store unix timestamps.
The solution to work with unix timestamps seems only to support a higher range data type like long

Closing this issue and opening a feature request to support long for timestamps.

All 2 comments

The issue is primarily because of the float datatype unable to store unix timestamps.
The solution to work with unix timestamps seems only to support a higher range data type like long

Closing this issue and opening a feature request to support long for timestamps.

If you're using a unix timestamp, the problem is when it gets converted to Float, it loses precision, so lots of timestamps that actually represent different times end up being rounded and represented as the same x value. See #2891

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manucheri picture manucheri  路  3Comments

tsengvn picture tsengvn  路  3Comments

botondbutuza picture botondbutuza  路  3Comments

Giammaofwar picture Giammaofwar  路  3Comments

chathudan picture chathudan  路  3Comments