sách gpt4 ai đã đi

rChart nPlot - 更新 yAxis 标签

In lại 作者:行者123 更新时间:2023-12-04 18:08:58 28 4
mua khóa gpt4 Nike

我目前正在使用 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),有没有办法显示完整值?

谢谢,

1 Câu trả lời

我将我的评论作为完整的解决方案发布,以便其他人更容易找到它。

require(rCharts) # install the latest from the dev branch
test <- data.frame(object = c("A", "B"), price = c(111333, 876176))
test$Test <- "TEST"
n1 <- nPlot(price~Test, group = "object", data = test, type = "multiBarChart")
n1$yAxis(tickFormat = "#! function(d) {return '$' + d} !#")

关于rChart nPlot - 更新 yAxis 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19239535/

28 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com