use format_num() in vignette

This commit is contained in:
pvictor 2020-03-20 10:17:08 +01:00
parent 01231de378
commit cc0a11de24
1 changed files with 2 additions and 6 deletions

View File

@ -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