Numeric display signage confusion for 0

Tags: #<Tag:0x00007f8b23f620d8>

Hey there, our issue comes into play when a very small value (ex: -.000001) has the number of decimals set so that the value gets rounded to “.0”. This confuses the user as to whether or not the small number is negative or positive. In this case, we would like the table to show the value as “-.0” as that indicates to the user that the value is actually smaller than 0 and negative. Even if the user doesn’t want to see the full decimals, we would still like to display the signage as “-.0” rather than “.0”, as the number is truly negative.

I have attached two screenshots to demonstrate. The drop down list with the numbers represents how many decimals the user wishes to display and when they select a low amount, the -.000001 is shown as “.0” rather than what we’d like to show as “-.0”.

screenshot-1 screenshot-2

Any thoughts on how this may be done? Custom renderer? Custom plugin? Formatting?

Also a thing to note is that our column type is “numeric”

Hey @sagar.patel

I suggest using a custom renderer. Here is an example https://jsfiddle.net/4t1za3pv/1/

Let me know if it meets your requirements.

Yes, that was the solution. Thank you!

1 Like