Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dyRoller

dygraph rolling average period text box


Description

Add a rolling average period text box to the bottom left of the plot. Y values are averaged over the specified number of time scale units.

Usage

dyRoller(dygraph, showRoller = TRUE, rollPeriod = 1)

Arguments

dygraph

Dygraph to add roller to

showRoller

Whether to show the roller

rollPeriod

Number of time scale units (e.g. days, months, years) to average values over.

Value

A dygraph that displays a range selector

Note

See the online documentation for additional details and examples.

Examples

library(dygraphs)

dygraph(discoveries, main = "Important Discoveries") %>% 
  dyRoller(rollPeriod = 5)

dygraphs

Interface to 'Dygraphs' Interactive Time Series Charting Library

v1.1.1.6
MIT + file LICENSE
Authors
Dan Vanderkam [aut, cph] (dygraphs library in htmlwidgets/lib, http://dygraphs.com/), Petr Shevtsov [cre, cph], JJ Allaire [aut], RStudio [cph], Jonathan Owen [aut, cph], Daniel Gromer [aut, cph], Benoit Thieurmel [aut, cph], Kent Laukhuf [ctb], jQuery Foundation [cph] (jQuery library), jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/htmlwidgets/lib/jquery/AUTHORS.txt)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.