diff --git a/R/chartSeries.R b/R/chartSeries.R index e55060e7..fe3a3f21 100644 --- a/R/chartSeries.R +++ b/R/chartSeries.R @@ -594,6 +594,15 @@ function(x, } } } + # Pass chart.layout settings + if(!inherits(layout, "chart.layout")) { + cl <- chart.layout(length(cs$Env$ylim)-1) + } else + cl <- layout + # since xts::plot.xts is applied, chartSeries should now be layout free + # layout(cl$mat, cl$width, cl$height, respect=FALSE) + cs$Env$mar <- cl$par.list[[3]]$mar + assign(".xts_chob", cs, xts:::.plotxtsEnv) if(plot) # draw the chart cs