【发布时间】:2013-10-08 05:09:36
【问题描述】:
我目前正在使用 rCharts 包中的 nPlot,如何将 $ 符号添加到 y 轴?
我想我需要像 n1$yAxis(labels = ...) 这样的东西,但我认为 nPlot 不支持这个?
test <- data.frame(object = c("A", "B"), price = c(111333, 876176))
test$Test <- "TEST"
n1 <- nPlot(price~Test, group = "object", data = test, type = "multiBarChart")
另外,看起来 nPlot 正在四舍五入到 5 个有效数字(最初认为它是四舍五入到最接近的 10),有没有办法显示完整值?
谢谢,
【问题讨论】:
-
你想在 y 轴标题中添加一个美元符号吗?
-
我刚刚将修复推送到
rCharts的dev分支。转json时使用13位,可以使用options('rcharts.digits')控制。 -
@Michele 我想在 y 轴标签上添加美元符号,例如像 scale_y_continuous("Price", labels = Dollar) 来自 scales 包
-
@Ramnath 我要重新安装 rCharts 包吗?
-
是的。
devtools::install_github('rCharts', 'ramnathv', ref = 'dev')