File: dyHighlight.Rd

package info (click to toggle)
r-cran-dygraphs 1.1.1.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,232 kB
  • sloc: javascript: 10,787; sh: 19; makefile: 15
file content (51 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/highlight.R
\name{dyHighlight}
\alias{dyHighlight}
\title{dygraph series mouse-over highlighting}
\usage{
dyHighlight(dygraph, highlightCircleSize = 3,
  highlightSeriesBackgroundAlpha = 0.5, highlightSeriesOpts = list(),
  hideOnMouseOut = TRUE)
}
\arguments{
\item{dygraph}{Dygraph to configure highlighting behavior for.}

\item{highlightCircleSize}{The size in pixels of the dot drawn over 
highlighted points.}

\item{highlightSeriesBackgroundAlpha}{Fade the background while highlighting 
series. 1=fully visible background (disable fading), 0=hidden background 
(show highlighted series only).}

\item{highlightSeriesOpts}{When set, the options from this list are applied 
to the series closest to the mouse pointer for interactive highlighting. 
Example: list(strokeWidth = 3). See the documentation on 
\code{\link{dySeries}} for additional details on options that can be set.}

\item{hideOnMouseOut}{Whether to hide the highlighting effects when the mouse
leaves the chart area. Note that this also affects the hiding of the 
\code{\link{dyLegend}} on mouse out.}
}
\value{
A dygraph with customized highlighting options
}
\description{
Configure options for data series mouse-over highlighting. Note that 
highlighting is always enabled for dygraphs so this function is used to 
customize rather than enable highlighting.
}
\note{
See the
\href{https://rstudio.github.io/dygraphs/gallery-series-highlighting.html}{online
documentation} for additional details and examples.
}
\examples{
library(dygraphs)
lungDeaths <- cbind(ldeaths, mdeaths, fdeaths)
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") \%>\%
  dyHighlight(highlightCircleSize = 5, 
              highlightSeriesBackgroundAlpha = 0.2,
              hideOnMouseOut = FALSE)   
 
}