joshuaulrich / xts

Extensible time series class that provides uniform handling of many R time series classes by extending zoo.
http://joshuaulrich.github.io/xts/
GNU General Public License v2.0
219 stars 70 forks source link

Refactor `plot.xts()` internals #408

Closed joshuaulrich closed 5 months ago

joshuaulrich commented 8 months ago

Original design

plot.xts() is based on quantmod::chart_Series(). The internal structures have a lot of implicit assumptions and some duplicated code, which makes the code harder to reason about and change. For example:

The main purpose for this refactor is to make it easier to implement y-axis log scaling (#103).

Refactor target design

The target design attempts to organize the plot components into their respective parts: the plot window, the window panels, and the panel data/actions.