File: rangeslider.Rd

package info (click to toggle)
r-cran-plotly 4.10.4%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 30,636 kB
  • sloc: javascript: 195,272; sh: 24; makefile: 6
file content (42 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (2)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{rangeslider}
\alias{rangeslider}
\title{Add a range slider to the x-axis}
\usage{
rangeslider(p, start = NULL, end = NULL, ...)
}
\arguments{
\item{p}{plotly object.}

\item{start}{a start date/value.}

\item{end}{an end date/value.}

\item{...}{these arguments are documented here
\url{https://plotly.com/r/reference/#layout-xaxis-rangeslider}}
}
\description{
Add a range slider to the x-axis
}
\examples{
\dontshow{if (interactive() || !identical(.Platform$OS.type, "windows")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}

plot_ly(x = time(USAccDeaths), y = USAccDeaths) \%>\% 
  add_lines() \%>\%
  rangeslider()
  
d <- tibble::tibble(
  time = seq(as.Date("2016-01-01"), as.Date("2016-08-31"), by = "days"),
  y = rnorm(seq_along(time))
 )
 
plot_ly(d, x = ~time, y = ~y) \%>\%
  add_lines() \%>\%
  rangeslider(d$time[5], d$time[50])
  
\dontshow{\}) # examplesIf}
}
\author{
Carson Sievert
}