Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix not find "y_grid_lines" function and subsetting bug
Function y_grid_lines is not exported and is in plot_object$Env. chart* functions called in add* are passed to "lenv" environment so y_grid_lines cannot be found. y_grid_lines function is defined in chart* by y_grid_lines <- plot_object$Env$y_grid_lines. For add*MA functions, x.tmp should not be passed by x.tmp[xsubset] because when zoomChart is called, series used to calculate moving averages will change with the subset period if we pass x.tmp[xsubset] to x.tmp. Moving avrage indicators are passed to ma by ma <- *MA(x.tmp, ...)[xsubset] so x.tmp should always be the initial series and should not change with the subset period.
- Loading branch information