dyCrosshair: The dyCrosshair plugin draws a crosshair line over the point...

Description Usage Arguments Value Examples

View source: R/plugins.R

Description

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.

Usage

1
dyCrosshair(dygraph, direction = c("both", "horizontal", "vertical"))

Arguments

dygraph

Dygraph to add plugin to

direction

Crosshair direction. Valid options are: "both", "horizontal", "vertical"

Value

Dygraph with Crosshair plugin enabled

Examples

1
2
3
4
library(dygraphs)
dygraph(ldeaths) %>%
  dyRangeSelector() %>%
  dyCrosshair(direction = "vertical")

dygraphs documentation built on May 2, 2019, 3:34 p.m.