quantmod
quantmod copied to clipboard
Refactor reChart function to make plot_object settings changeable
reChart function is the base function called by zoomChart()
and zooom()
.
Since plot_object$subset didn't seem to work for plot.xts based object, special handling is provided to fix unequal length issue and make x-axis and y-axis value changeable. The issue occurs in xts:::chart.lines()
function which calls lines()
to draw original price series for x by plot_object$Env$xycoords$x and the subset series for y. So it throws error: "'x' and 'y' lengths differ." See issue joshuaulrich/xts#146 for more detailed information.