Skip to content

Commit cd56c16

Browse files
przmvjack-davison
andcommitted
Convert dygraphs site to pkgdown
Co-authored-by: jack-davison <davison.jack.jd@gmail.com>
1 parent e509be8 commit cd56c16

173 files changed

Lines changed: 1188 additions & 56468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.Rbuildignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ examples/.*_files
55
docs/
66

77
^\.github$
8+
^_pkgdown\.yml$
9+
^docs$
10+
^pkgdown$
11+
^vignettes/articles$

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.Rhistory
33
.RData
44
.DS_Store
5+
docs

‎DESCRIPTION‎

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,48 @@
1-
Package: dygraphs
21
Type: Package
2+
Package: dygraphs
33
Title: Interface to 'Dygraphs' Interactive Time Series Charting Library
44
Version: 1.1.1.9000
55
Authors@R: c(
66
person("Dan", "Vanderkam", role = c("aut", "cph"),
7-
comment = "dygraphs library in htmlwidgets/lib, https://dygraphs.com/"),
8-
person("Petr", "Razumov", role = c("cre", "cph"),
9-
email = "ptr@rzmv.su"),
10-
person("JJ", "Allaire", role = c("aut")),
11-
person(family = "RStudio", role = "cph"),
7+
comment = "dygraphs library in htmlwidgets/lib, https://dygraphs.com/"),
8+
person("Petr", "Razumov", , "ptr@rzmv.su", role = c("cre", "cph")),
9+
person("JJ", "Allaire", role = "aut"),
10+
person(, "RStudio", role = "cph"),
1211
person("Jonathan", "Owen", role = c("aut", "cph")),
1312
person("Daniel", "Gromer", role = c("aut", "cph")),
1413
person("Benoit", "Thieurmel", role = c("aut", "cph")),
1514
person("Kent", "Laukhuf", role = "ctb"),
16-
person(family = "jQuery Foundation", role = "cph",
15+
person(, "jQuery Foundation", role = "cph",
1716
comment = "jQuery library"),
18-
person(family = "jQuery contributors", role = c("ctb", "cph"),
17+
person(, "jQuery contributors", role = c("ctb", "cph"),
1918
comment = "jQuery library; authors listed in inst/htmlwidgets/lib/jquery/AUTHORS.txt")
20-
)
21-
URL: https://github.com/rstudio/dygraphs
22-
BugReports: https://github.com/rstudio/dygraphs/issues
19+
)
2320
Description: An R interface to the 'dygraphs' JavaScript charting library
2421
(a copy of which is included in the package). Provides rich facilities
2522
for charting time-series data in R, including highly configurable
2623
series- and axis-display and interactive features like zoom/pan and
2724
series/point highlighting.
2825
License: MIT + file LICENSE
26+
URL: https://rstudio.github.io/dygraphs/,
27+
https://github.com/rstudio/dygraphs
28+
BugReports: https://github.com/rstudio/dygraphs/issues
2929
Depends:
3030
R (>= 3.0)
3131
Imports:
32-
magrittr,
33-
htmlwidgets (>= 0.6),
3432
htmltools (>= 0.3.5),
35-
zoo (>= 1.7-10),
36-
xts (>= 0.9-7)
33+
htmlwidgets (>= 0.6),
34+
magrittr,
35+
xts (>= 0.9-7),
36+
zoo (>= 1.7-10)
3737
Suggests:
3838
testthat
39-
Enhances: rmarkdown (>= 0.3.3), shiny (>= 0.10.2.1)
40-
RoxygenNote: 7.1.1
39+
Enhances:
40+
rmarkdown (>= 0.3.3),
41+
shiny (>= 0.10.2.1)
42+
Config/Needs/website:
43+
RColorBrewer,
44+
pkgdown,
45+
quantmod
46+
tidyverse/tidytemplate,
47+
Config/roxygen2/version: 8.1.0
48+
Encoding: UTF-8

‎NAMESPACE‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ importFrom(grDevices,rgb)
4747
importFrom(htmltools,htmlDependency)
4848
importFrom(htmlwidgets,JS)
4949
importFrom(magrittr,"%>%")
50-
importFrom(stats,end)
51-
importFrom(stats,start)
52-
importFrom(zoo,as.yearmon)
53-
importFrom(zoo,as.yearqtr)
50+
importFrom(stats,
51+
end,
52+
start
53+
)
54+
importFrom(zoo,
55+
as.yearmon,
56+
as.yearqtr
57+
)

‎NEWS.md‎

Lines changed: 36 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,62 @@
11
# dygraphs (development version)
22

3-
* Start of development for dygraphs 2.0
4-
5-
dygraphs 1.1.1.7
6-
--------------------------------------------------------------------------------
3+
# dygraphs 1.1.1.7
74

85
* Added the ability for multiple series have different point shapes
96

10-
11-
dygraphs 1.1.1.6
12-
--------------------------------------------------------------------------------
7+
# dygraphs 1.1.1.6
138

149
* Fix bug which prevented accessing dygraph object in HTMLWidget (#196)
1510

11+
# dygraphs 1.1.1.5
1612

17-
dygraphs 1.1.1.5
18-
--------------------------------------------------------------------------------
19-
20-
* Added pointShape parameter to dyOptions and dySeries function to set point shapes
13+
* Added pointShape parameter to `dyOptions()` and `dySeries()` function to set point shapes
2114
other than dots
2215

23-
* Updated dyPlugin behavior to merge same plugin's options for every repeated
16+
* Updated `dyPlugin()` behavior to merge same plugin's options for every repeated
2417
function call
2518

19+
# dygraphs 1.1.1.4
2620

27-
dygraphs 1.1.1.4
28-
--------------------------------------------------------------------------------
29-
30-
* Added dyRibbon for creating horizontal band of colors to visualize categorical
21+
* Added `dyRibbon()` for creating horizontal band of colors to visualize categorical
3122
variables
3223

33-
* Added dyRebase for creating straw broom charts
24+
* Added `dyRebase()` for creating straw broom charts
3425

35-
* Updated dyCandlestick with parameter to compress data by time periods
26+
* Updated `dyCandlestick()` with parameter to compress data by time periods
3627

3728
* Handle display of quarterly scales via moment-quarter plugin
3829

39-
* Make dyUnzoom and dyCrosshair available as package functions
40-
30+
* Make `dyUnzoom()` and `dyCrosshair()` available as package functions
4131

42-
dygraphs 1.1.1.3
43-
--------------------------------------------------------------------------------
32+
# dygraphs 1.1.1.3
4433

45-
* Added dyCandlestick for creating candlestick/OHLC style charts
34+
* Added `dyCandlestick()` for creating candlestick/OHLC style charts
4635

47-
* Added dyPlotter for defining custom plotters
36+
* Added `dyPlotter()` for defining custom plotters
4837

4938
* Added Shiny callbacks that react when the user clicks on the graph
5039

5140
* Support for non-date values in shiny input bindings (#132)
5241

5342
* Don't call shiny input bindings if they aren't yet available
5443

55-
56-
dygraphs 1.1.1.2
57-
--------------------------------------------------------------------------------
44+
# dygraphs 1.1.1.2
5845

5946
* Fix for shiny input binding regression introduced in move to instance
6047
bound widgets (#123)
6148

62-
63-
dygraphs 1.1.1-1
64-
--------------------------------------------------------------------------------
49+
# dygraphs 1.1.1-1
6550

6651
* Create shiny input binding after dygraph is created (#121)
6752

68-
* Reflect color in dyEvent text label (#122)
53+
* Reflect color in `dyEvent()` text label (#122)
6954

55+
# dygraphs 1.1.1.0
7056

71-
dygraphs 1.1.1.0
72-
--------------------------------------------------------------------------------
57+
* New `dyPlugin()` function for including dygraphs plugins
7358

74-
* New dyPlugin function for including dygraphs plugins
75-
76-
* Properly handle NULL dyEvent label (#112)
59+
* Properly handle NULL `dyEvent()` label (#112)
7760

7861
* Handle milliseconds in time events (#85)
7962

@@ -82,67 +65,55 @@ dygraphs 1.1.1.0
8265
* Implement factory method so dygraph is addressable from widget instance:
8366
e.g. HTMLWidgets.getInstance(document.getElementById('mywidget')).dygraph
8467

68+
# dygraphs 0.9
8569

86-
dygraphs 0.9
87-
--------------------------------------------------------------------------------
88-
89-
* Handle vector data in dyEvent
70+
* Handle vector data in `dyEvent()`
9071

9172
* Don't do sizeChanged polling (no longer required)
9273

9374
* Option to disable y-axis touch events on mobile devices
9475

95-
96-
dygraphs 0.8
97-
--------------------------------------------------------------------------------
76+
# dygraphs 0.8
9877

9978
* Manage visibility of dygraphs in all types of boostrap tab panes
10079

10180
* Call widget.resize whenever parent size changes
10281

103-
104-
dygraphs 0.7
105-
--------------------------------------------------------------------------------
82+
# dygraphs 0.7
10683

10784
* Ensure that dygraphs are shown properly in R Markdown tabsets
10885

10986
* Ensure that dygraphs are shown properly in reveal.js presentations
11087

111-
* Fix bug which prevented custom plotters from working in dySeries
112-
88+
* Fix bug which prevented custom plotters from working in `dySeries()`
11389

114-
dygraphs 0.6
115-
--------------------------------------------------------------------------------
90+
# dygraphs 0.6
11691

11792
* Add support for plotting data with a numeric x-axis (previously only time series
11893
data was accepted).
11994

12095
* Add new logscale option for numeric x-axis.
12196

122-
* Add stemPlot option to dyOptions and dySeries.
97+
* Add stemPlot option to `dyOptions()` and `dySeries()`.
12398

124-
125-
dygraphs 0.5
126-
--------------------------------------------------------------------------------
99+
# dygraphs 0.5
127100

128101
* Update embedded dygraphs to version 1.1
129102

130-
* Add support for show='follow' to dyLegend
103+
* Add support for show='follow' to `dyLegend()`
131104

132-
* Add labelsUTC option to dyOptions
105+
* Add labelsUTC option to `dyOptions()`
133106

134107
* Change default x axis label width to 60 (necessitated by changes to default
135108
dygraphs 1.1 x-axis year formatting)
136109

137110
* Allow explicit specification of series periodicity when creating a dygraph
138111

139-
140-
dygraphs 0.4.5
141-
--------------------------------------------------------------------------------
112+
# dygraphs 0.4.5
142113

143114
* Correct serialization of dates with year < 1000
144115

145-
* Add axis argument to dyShading for horizontal shading
116+
* Add axis argument to `dyShading()` for horizontal shading
146117

147118
* Add dyLimit function for drawing horizontal limit lines
148119

@@ -156,9 +127,7 @@ dygraphs 0.4.5
156127
* Fix failure to update shiny date range input after graph is
157128
re-rendered based on new data or options.
158129

159-
160-
dygraphs 0.4.3
161-
--------------------------------------------------------------------------------
130+
# dygraphs 0.4.3
162131

163132
* Support dynamic updating (i.e. for Shiny reactive outputs) for all dygraphs
164133
properties (destroy and rebuild the entire dygraph on renderValue)
@@ -167,15 +136,11 @@ dygraphs 0.4.3
167136

168137
* Fix issue where dygraph in ioslides didn't display on slide entry
169138

170-
171-
dygraphs 0.4.2
172-
--------------------------------------------------------------------------------
139+
# dygraphs 0.4.2
173140

174141
* Fix bug with specification of multiple series colors
175142

176-
177-
dygraphs 0.4.1
178-
--------------------------------------------------------------------------------
143+
# dygraphs 0.4.1
179144

180145
* Add useDataTimezone option to enable time display using the underlying
181146
xts timezone rather than the timezone of the client workstation.
@@ -186,11 +151,9 @@ dygraphs 0.4.1
186151

187152
* Fix bug which caused specification of only a single custom color to fail
188153

189-
* Add explicit showRoller option to dyRoller function
190-
154+
* Add explicit showRoller option to `dyRoller()` function
191155

192-
dygraphs 0.3.3
193-
--------------------------------------------------------------------------------
156+
# dygraphs 0.3.3
194157

195158
Initial release to CRAN
196159

‎README.md‎

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,50 @@
88

99
<!-- badges: end -->
1010

11-
The dygraphs package is an R interface to the [dygraphs](https://dygraphs.com) JavaScript charting library. It provides rich facilites for charting time-series data in R, including:
11+
The `{dygraphs}` package is an R interface to the [dygraphs](https://dygraphs.com) JavaScript charting library. It provides rich facilities for charting time-series data in R, including:
1212

1313
- Automatically plots [xts](http://cran.rstudio.com/web/packages/xts/index.html) time series objects (or any object convertible to xts).
14+
1415
- Highly configurable axis and series display (including optional second Y-axis).
15-
- Rich interactive features including [zoom/pan](https://rstudio.github.io/dygraphs/gallery-range-selector.html) and series/point [highlighting](https://rstudio.github.io/dygraphs/gallery-series-highlighting.html).
16-
- Display [upper/lower bars](https://rstudio.github.io/dygraphs/gallery-upper-lower-bars.html) (e.g. prediction intervals) around series.
17-
- Various graph overlays including [shaded regions](https://rstudio.github.io/dygraphs/gallery-shaded-regions.html), [event lines](https://rstudio.github.io/dygraphs/gallery-event-lines.html), and point [annotations](https://rstudio.github.io/dygraphs/gallery-annotations.html).
16+
17+
- Rich interactive features including [zoom/pan](https://rstudio.github.io/dygraphs/articles/gallery-range-selector.html) and series/point [highlighting](https://rstudio.github.io/dygraphs/articles/gallery-series-highlighting.html).
18+
19+
- Display [upper/lower bars](https://rstudio.github.io/dygraphs/articles/gallery-upper-lower-bars.html) (e.g. prediction intervals) around series.
20+
21+
- Various graph overlays including [shaded regions](https://rstudio.github.io/dygraphs/articles/gallery-shaded-regions.html), [event lines](https://rstudio.github.io/dygraphs/articles/gallery-event-lines.html), and point [annotations](https://rstudio.github.io/dygraphs/articles/gallery-annotations.html).
22+
1823
- Use at the R console just like conventional R plots (via RStudio Viewer).
19-
- Seamless embedding within [R Markdown](https://rstudio.github.io/dygraphs/r-markdown.html) documents and [Shiny](https://rstudio.github.io/dygraphs/shiny.html) web applications.
24+
25+
- Seamless embedding within [R Markdown](https://rstudio.github.io/dygraphs/articles/dygraphs.html#rmarkdown) documents and [Shiny](https://rstudio.github.io/dygraphs/articles/dygraphs.html#shiny) web applications.
2026

2127
## Installation
2228

23-
The dygraphs package depends on the development version of the [htmlwidgets](https://github.com/ramnathv/htmlwidgets) package so you need to install both packages. You can do this using the **devtools** package as follows:
29+
You can install this package from CRAN, or the development version from GitHub:
30+
31+
``` r
32+
# CRAN version
33+
install.packages('dygraphs')
2434

25-
```S
26-
devtools::install_github(c("ramnathv/htmlwidgets", "rstudio/dygraphs"))
35+
# Or Github version
36+
if (!require('remotes')) install.packages('remotes')
37+
remotes::install_github('rstudio/dygraphs')
2738
```
2839

2940
## Usage
3041

3142
If you have an xts-compatible time-series object creating an interactive plot of it is as simple as this:
3243

33-
```S
44+
```r
3445
dygraph(nhtemp, main = "New Haven Temperatures")
3546
```
3647

37-
You can also further customize axes and series display as well as add interacitve features like a range selector:
48+
You can also further customize axes and series display as well as add interactive features like a range selector:
3849

39-
```S
50+
```r
4051
dygraph(nhtemp, main = "New Haven Temperatures") %>%
4152
dyAxis("y", label = "Temp (F)", valueRange = c(40, 60)) %>%
4253
dyOptions(fillGraph = TRUE, drawGrid = FALSE) %>%
4354
dyRangeSelector()
4455
```
4556

46-
See the [online documentation](http://rstudio.github.io/dygraphs) for the dygraphs package for additional details and examples.
57+
See the [online documentation](http://rstudio.github.io/dygraphs) for the `{dygraphs}` package for additional details and examples.

0 commit comments

Comments
 (0)