-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Intuitive display of negative timedeltas #8274
Labels
enhancement:request
Enhancement request submitted by anyone from the community
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
12 tasks
benvdh
added a commit
to benvdh/incubator-superset
that referenced
this issue
Sep 21, 2019
benvdh
added a commit
to benvdh/incubator-superset
that referenced
this issue
Sep 21, 2019
benvdh
added a commit
to benvdh/incubator-superset
that referenced
this issue
Sep 21, 2019
benvdh
added a commit
to benvdh/incubator-superset
that referenced
this issue
Sep 21, 2019
benvdh
added a commit
to benvdh/incubator-superset
that referenced
this issue
Sep 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
At the moment I'm working on a dashboard for a customer of ours that has to display averages of timedeltas. Luckily PostgreSQL has a native datatype called interval to save such data, and that makes it possible to calculate averages over them too. Superset is currently able to show the results of such aggregations in its table visualisation by converting the postgres interval data to python's timedelta type. However, this has one disadvantage, a negative interval of -6 minutes becomes:
The main rationale behind the above result is that the string representation matches the timedelta object's internal representation[1]. The above displayed value relates to the -6 minutes by interpreting -1 day as -24 hours and the hours and minutes part as +23 hours + 54 minutes. If we sum those values we end up with -6 minutes.
However, for a customer having to interpret a whole column with tens of values like this, this quickly becomes a hassle and makes it hard to compare the values, not to speak of the cognitive load it brings to interpret the data.
A similar discussion is currently going on in the pandas community: pandas-dev/pandas#17232
Describe the solution you'd like
Personally I would like -6 minutes to be displayed as
-0 days, 00:06:00
or something similar. This makes it much more intuitive for the user of the dashboard. I already have a pull request available which does exactly that, it's based on a solution to this problem suggested on SO[2].Describe alternatives you've considered
Solution 2 would require more effort from the user when building a dasboard, solution 3 has a much larger scope, and 4 would likely be the size of a SIP.
Additional context
Add any other context or screenshots about the feature request here.
[1] pandas-dev/pandas#17232 (comment)
[2] https://stackoverflow.com/a/8408947/10243474
The text was updated successfully, but these errors were encountered: