【发布时间】:2015-08-17 21:10:11
【问题描述】:
我想将 rchart nvd3 中 lineChart 的 xAxis 上的间隔指定为 1。
目前我有一个动态图表,其中 xAxis 为 0-6、0-5 或 0-3 - 当 xAxis 的范围仅为 0-3 时,刻度间隔自动变为 0.5,但在这种情况下不会没有意义,我希望它仍然按整数间隔进行 - 我该如何指定?
目前我的代码如下:
p <- nPlot( yvalue ~ xvalue, data = dat, group = "scenario_id", type = "lineChart" )
p$yAxis(tickFormat = "#!
function(d) {return d3.format('%')(d)}
!#" )
【问题讨论】: