Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long data type for Timestamps in Timeseries chart #2203

Open
utkarshns opened this issue Aug 27, 2016 · 10 comments
Open

Long data type for Timestamps in Timeseries chart #2203

utkarshns opened this issue Aug 27, 2016 · 10 comments

Comments

@utkarshns
Copy link

Please add long datatype support for unix timestamps in the timeseries LineChart.
The current float 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.

@utkarshns
Copy link
Author

@PhilJay
Anything?

@zkdzegede
Copy link

zkdzegede commented Sep 23, 2016

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.

@utkarshns
Copy link
Author

@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?

@xelnaga
Copy link

xelnaga commented Oct 27, 2016

Same problem. This is a big limitation.

@zkdzegede
Copy link

zkdzegede commented Nov 10, 2016

@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?

@LunarWatcher
Copy link

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

@nisiode
Copy link

nisiode commented Aug 20, 2018

+1

@l2dev
Copy link

l2dev commented Feb 15, 2019

It's 2019 and we still dont have ability to use longs for timestamps?

@utkarshns
Copy link
Author

utkarshns commented Feb 15, 2019 via email

Jeehut added a commit to FlineDev/FitnessTracker-Android that referenced this issue Dec 28, 2019
@KhushbuShah25
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants