我有一个最小的例子,希望以百分比显示值。有什么想法吗?
在这里你可以找到API文档。
maxValue <- 160
echarts4r::e_charts() %>%
echarts4r::e_gauge(
value = round(runif(1, 0, maxValue)),
name = "description",
radius = "80%",
startAngle = 210, #225,
endAngle = -30, #-45,
min = 0,
max = maxValue,
splitNumber = maxValue/20
)发布于 2020-01-08 16:09:36
抱歉,我刚碰到这件事。
这个能行吗?计算百分比R-侧,并使用formatter添加百分比符号.
maxValue <- 160
echarts4r::e_charts() %>%
echarts4r::e_gauge(
value = round((runif(1, 0, maxValue) / maxValue) * 100),
name = "description",
radius = "80%",
startAngle = 210, #225,
endAngle = -30, #-45,
min = 0,
max = maxValue,
splitNumber = maxValue/20,
detail = list(
formatter = "{value}%"
)
)https://stackoverflow.com/questions/58749792
复制相似问题