Percentage Formatting

#1

With the percentage format, is there a way to determine how it function?

My values are in the form of solid numbers. (i.e. 95.6, 0.5, 0.05)
This would mean I would like the percentage to look similar. (i.e. 95.6%, 0.5%, 0.05%)

The percentage format, however, will move the decimal two places. (i.e. 9560%, 50%, 5%)

Are there additional options to control this use?

0 Likes

#2

can’t you just concatenate the values with suffix %?

0 Likes

#3

How would I go about doing that?
I cant seem to use the “value” field when traversing a reference field.
"value": "{{parent.child.child.value}} %" doesnt work

0 Likes

#4

Check the helper functions, e.g:

C3.script.helpers.appendString(11, '%')

in your case try:

"value": "appendString({{parent.child.child.value}}, '%')"
1 Like

#5

Oh my goodness that makes so much more sense. Thank you so much!!

0 Likes

#6

Oops, Append String was the correct way but the sytax was wrong. Maximus informed me that it is through the format field.

"format": {
    "funk": "appednString",
    "args": "%"
}
0 Likes