Skip to content

Getting Started

Create interactive time series visualizations with dygraphs.

dygraph()
dygraph interactive plot for time series data
dygraphs-exports %>% as.yearmon as.yearqtr
dygraph exported operators and S3 methods

Axes, Series and Display

Control axes, labels, legends and series appearance.

dyAxis()
dygraph axis
dySeries()
dygraph data series
dyGroup()
dygraph series group
dyLegend()
dygraph legend
dyOptions()
dygraph options
dyCSS()
CSS for dygraph labels and legend

Interactivity

Add zooming, highlighting, crosshairs and other interactive features.

dyRangeSelector()
dygraph interactive range selection and zooming
dyHighlight()
dygraph series mouse-over highlighting
dyCrosshair()
The dyCrosshair plugin draws a crosshair line over the point closest to the mouse when the user hovers over the graph. It has a "direction" option which is provided in the R wrapper function and then forwarded to the plugin using the "options" argument to dyPlugin.
dyRoller()
dygraph rolling average period text box
dyUnzoom()
The dyUnzoom plugin adds an "Unzoom" button to the graph when it's displaying in a zoomed state (this is a bit more discoverable than the default double- click gesture for unzooming).

Annotations and Overlays

Add contextual information to charts.

dyAnnotation()
Annotation for dygraph chart
dyEvent()
dygraph event line
dyLimit()
dygraph limit line
dyShading()
dygraph region shading
dyRibbon()
dyRibbon plugin adds a horizontal band of colors that runs through the chart. It can be useful to visualize categorical variables (http://en.wikipedia.org/wiki/Categorical_variable) that change over time (along the x-axis).

Plot Types and Plotters

Alternative visual representations and custom plotters.

Plugins and Extensions

Extend dygraphs with plugins, callbacks and dependencies.

dyPlugin()
Include a dygraph plugin
dyCallbacks()
Callbacks for dygraph events
dyDependency()
Add external assets as a dygraph dependency

Data and Transformations

Utilities for supplying and transforming data.

dySeriesData()
Add series data to dygraph
dyDataHandler()
Include a dygraph data handler
dyRebase()
Rebase data handler for straw broom charts with Dygraph

Shiny Integration

Use dygraphs within Shiny applications.

dygraphOutput() renderDygraph()
Shiny bindings for dygraph