chart_dygraph2y: Plot an interactive _dygraphs_ line plot for two _xts_ time...

View source: R/rutils.R

chart_dygraph2yR Documentation

Plot an interactive dygraphs line plot for two xts time series, with two "y" axes.

Description

Plot an interactive dygraphs line plot for two xts time series, with two "y" axes.

Usage

chart_dygraph2y(xtsv, ...)

Arguments

xtsv

An xts time series with two columns.

...

Additional arguments to function dygraphs::dygraph().

Details

The function chart_dygraph2y() creates an interactive dygraphs line plot with two "y" axes. The function chart_dygraph2y() uses plotting functions from the package dygraphs.

Value

A dygraphs plot object.

Examples

# Plot an interactive dygraphs line plot with two "y" axes
prices <- cbind(Ad(rutils::etfenv$VTI), Ad(rutils::etfenv$IEF))
colnames(prices) <- get_name(colnames(prices), field=2)
rutils::chart_dygraph2y(prices)

algoquant/rutils documentation built on April 18, 2024, 12:05 a.m.