Learn R Programming

quantmod (version 0.3-3)

zoomChart: Change Zoom Level Of Current Chart

Description

Using xts style date subsetting, zoom into or out of the current chart.

Usage

zoomChart(subset = NULL)

Arguments

subset
a valid subset string

Value

  • This function is called for its side effect - notably changing the perspective of the current chart, and changing its formal subset level. The underlying data attached to the chart is left unchanged.

Details

This function allows for viewing of specific areas of a chart produced by chartSeries by simply specifying the dates of interest

Standard format for the subset argument is the same as the subsetting for xts objects, which is how the data is stored internally for rendering.

Calling zoomChart with no arguments (NULL) resets the chart to the original data.

Examples include '2007' for all of the year 2007, '2007::2008' for years 2007 through 2008, '::2007' for all data from the beginning of the set to the end of 2007, '2007::' all data from the beginning of 2007 through the end of the data. For specifics regarding the level of detail and internal interpretation please see [.xts

See Also

chartSeries

Examples

Run this code
data(sample_matrix)
chartSeries(sample_matrix)
zoomChart('2007-04::')
zoomChart()

Run the code above in your browser using DataLab