Open utkarshns opened 8 years ago
@PhilJay Anything?
For a temporary fix.
I just record the first timestamp myself, and then use the diff between the first timestamp and subsequent ones (and divide by 1000), so that my xAxis starts from 0 and increases by 1 for each second.
@zkdzegede Even I am using that sort of technique but it adds to extra processing, it would be great to just have a larger datatype.
@PhilJay anything?
Same problem. This is a big limitation.
@utkarshns
I agree it would be nice, but a double/long could hurt performance so I could see why they chose float
:(
edit: Maybe it could be made more extensible, so that the user can pick what they need e.g using the Number object?
I know I'm rather late on this issue, but there is a way Double and/or Long could be added.
While they apparently hurt performance, anyone who wants to use it should be allowed to. Maintaining Float as the "main" data type but adding support for Double and Long would allow those that need fast charts to use Float and those who need accurate charts and don't care about performance to use Double and Long. A warning could be added to warn anyone who wants to use it that it does hurt performance.
This way everyone is happy, as it supports multiple data types while still having the option of taking a fast chart.
I'm basically saying keep float, but add support for double and long. Keep float as the "main" data type and add different classes that have different names for Double and Long. The existing code (if this is implemented) would still be Float based unless it is rewritten with the class names for Double or Long
+1
It's 2019 and we still dont have ability to use longs for timestamps?
True, you can however have a workaround. Please look at earlier messages for the same.
On Fri 15 Feb, 2019, 6:52 PM Eimantas Urbonas <notifications@github.com wrote:
It's 2019 and we still dont have ability to use longs for timestamps?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PhilJay/MPAndroidChart/issues/2203#issuecomment-464048787, or mute the thread https://github.com/notifications/unsubscribe-auth/AI2yrWfJ7ZklXAumh1w7IVaKn4GmJ-zTks5vNrShgaJpZM4Juw-I .
Hello, any update on this ? I have the same issue and I am looking for a solution to plot a lot of points where X is unix timestamp.
Please add
long
datatype support for unix timestamps in the timeseries LineChart. The currentfloat
datatype isn't precisely able to store timestamps which are near to each other, as a result the end bits are truncated and the nearby values end up being overwritten leading to incorrect plots.