-
Notifications
You must be signed in to change notification settings - Fork 327
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
Support decimal values in table progress cell type #824
Comments
Thanks for the issue @vopani. Just to clarify, do you need to to show also the progress arc or just a standalone value? |
The progress arc looks very attractive in a table and hence I've been using that. But, if there could be some 'other' cell_type that could be useful for decimal values then that would be good but maybe the easier solution now is to allow decimals in the value with the arc if that's feasible. |
Theoretically, there is a bit of space for 2 decimal places @lo5 @shanaka-rajitha wdyt? Should we add |
Let's go with updating the existing |
Hi, can I work on this issue? |
Hello Wave, I have a solution for this issue to support decimal values in table progress cell type. As explained in the issue, the table progress cell currently rounds values to whole numbers when diplaying them as a percentage. With this change, the percentage will now render with up to 2 decimal places. This is accomplished by using toFixed(2) and parseFloat() together to ensure data is rounded properly and then trailing zeros are removed. The code change in
Here is a partial screen shot of the Table example where you can see the progress data now being displayed with up to 2 decimal places: There is a new test case in
I have a branch in my fork of the project and will be submitting a PR later today. Let me know if this looks ok. Thanks! |
Is your feature request related to a problem? Please describe
I am using a
ui.progress_table_cell_type
to show some statistics in a table that has need for displaying decimal values.Describe the solution you'd like
Support for showing additional decimals instead of rounding to an integer.
Or
Support some other cell type that is suitable to decimal stats.
Comments
It should be optional / configurable of course, in most other cases I think rounding works great.
The text was updated successfully, but these errors were encountered: