Description Usage Arguments Value Examples
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.
1 | dyCrosshair(dygraph, direction = c("both", "horizontal", "vertical"))
|
dygraph |
Dygraph to add plugin to |
direction |
Crosshair direction. Valid options are: "both", "horizontal", "vertical" |
Dygraph with Crosshair plugin enabled
1 2 3 4 | library(dygraphs)
dygraph(ldeaths) %>%
dyRangeSelector() %>%
dyCrosshair(direction = "vertical")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.