【发布时间】:2015-08-17 18:58:03
【问题描述】:
我正在使用 Rcharts nvd3 中的 lineChart,我想将 y 值格式化为精确到十分之一 % 的百分比。我可以将格式设置为如下所示的百分比,但是当我将鼠标悬停在点上时,它只显示精确到 1% 的百分比,我无法精确到小数点后十位。
p$yAxis(tickFormat = "#!
function(d) {return d3.format('%')(d)}
!#"
)
我试过这样做,但没有成功:
p$yAxis(tickFormat = "#!
function(d) {return d3.format('.0%')(d)}
!#"
)
【问题讨论】: