1

When creating a stackedAreaChart with rChart and nvd3, the default setting is Stacked. Is there a way to set Expanded as default? Here is the code:

dat <- data.frame(t=rep(0:23,each=4),var=rep(LETTERS[1:4],4),val=round(runif(4*24,0,50)))
p8 <- nPlot(val ~ t, group =  'var', data = dat, type = 'stackedAreaChart', id = 'chart')
p8

Doing p8$chart(stacked = TRUE) works for multiBarChart, but p8$chart(expanded = TRUE) does not work with stackedAreaChart. Any ideas?

4

1 回答 1

3

这应该工作

p8$chart(style = 'expand')
于 2014-08-28T09:04:40.853 回答