Reputation: 1574
There is a number like this:
77.18%
It should be displayed like this:
77.2%
I have formatting using:
.4s
, .3s
, .1%
and few other formats which didn't make any change to the format.
Right now the adaptive formatting in Apache superset is giving 2 digits after the decimal, what should be the number format in order to display percentage number with 1 digit after the decimal?
Upvotes: 0
Views: 613
Reputation: 346
With d3.js, d3.format(".1%")(0.7718)
will return 77.2%.
You have to give a decimal number in input to the formatter.
Upvotes: 1