use format_num() in vignette
This commit is contained in:
parent
01231de378
commit
cc0a11de24
|
@ -49,9 +49,7 @@ bars <- bars %>%
|
||||||
ax_yaxis(
|
ax_yaxis(
|
||||||
title = list(text = "Weight (tons)"),
|
title = list(text = "Weight (tons)"),
|
||||||
labels = list(
|
labels = list(
|
||||||
formatter = JS(
|
formatter = format_num(".0%")
|
||||||
"function(value) {return Math.round(value * 100) + '%';}"
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
tickAmount = 6,
|
tickAmount = 6,
|
||||||
max = 0.3
|
max = 0.3
|
||||||
|
@ -116,9 +114,7 @@ count(mpg, class) %>%
|
||||||
ax_yaxis(
|
ax_yaxis(
|
||||||
title = list(text = "Weight (tons)"),
|
title = list(text = "Weight (tons)"),
|
||||||
labels = list(
|
labels = list(
|
||||||
formatter = JS(
|
formatter = format_num(".0%")
|
||||||
"function(value) {return Math.round(value * 100) + '%';}"
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
tickAmount = 6,
|
tickAmount = 6,
|
||||||
max = 0.3
|
max = 0.3
|
||||||
|
|
Loading…
Reference in New Issue