PerformanceAnalytics
PerformanceAnalytics copied to clipboard
Refactor chart.TimeSeries to use plot.xts
As all the time series charting functions in PerformanceAnalytics share with chart.TimeSeries
, we should refactor it with plot.xts
first and keep reviewing it to coordinate with other functions. Retain the log transformation feature and add dynamic graph extension using dygraphs package.
I don't think that we should work on dynamic graphs until all the core functionality has been implemented. When we do begin work on html charting frameworks, we have to decide on what approach we should use.
- integrate frameworks directly into the core functions
- write wrapper functions for html charting frameworks (e.g. dygraphs) that operate on objects that are invisibly returned from the core charting functions.
- other
Integrating html charting frameworks should discussed in a separate ticket
Understood. I think I paid too much attention on html charting. Then, for the core functionality, we can add the features chart.TimeSeries
doesn't have but plot.xts
does such as multi.panel
, up.col/dn.col
and some arguments regarding grid
.
multi.panel
Allows users to plot on multiple panels and arrange the layout themselves, layout(matrix(1:2, nrow = 1, ncol = 2))
, for example. We can set it to FALSE in chart.TimeSeries
as multiple charts are used in charts.TimeSeries
. So I think we should not discuss multiple charts here.
up.col/dn.col We can use them to display a more colorful histogram to identify positive and negative returns.
grid functions
For example, we can change the periodicity of grid.ticks.on
to control the interval between grid lines and grid.ticks.lty
to control the line type of grids.
As for the original functionality of chart.TimeSeries
, it allows users to add event lines and period areas. We can replace the basic charting functions for addLines
and addPolygon
to integrate with plot.xts
. At last, using addLegend
to control the legend.
These are what I think we can work on. How do you think? Do I get the point?