Skip to content

Commit a32a03e

Browse files
committed
remove config()'s cloud argument in favor of plotly.js' new config attribute
1 parent fa24f74 commit a32a03e

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
* **plotly** objects can now be serialized and unserialized in different environments (i.e., you can now use `saveRDS()` to save an object as an rds file and restore it on another machine with `readRDS()`). Note this object is *dynamically* linked to JavaScript libraries, so one should take care to use consistent versions of **plotly** when serializing and unserializing (#1376).
1414
* The `plotly_example()` will now attempt to open the source file(s) used to run the example. Set `edit = FALSE` to prevent the source file(s) from opening.
1515

16+
## CHANGES
17+
18+
* Since plotly.js now defaults to *not* showing the "Edit in Chart Studio" button, the `cloud` argument in `config()` was removed. If you want to show this button, use the new plotly.js `showSendToCloud` config attribute instead (e.g. `config(plot_ly(), showSendToCloud = TRUE)`)
19+
1620
## BUG FIXES
1721

1822
* `subplot()` now bumps annotation `xref`/`yref` anchors correctly (#1181).

R/layout.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ rangeslider <- function(p, start = NULL, end = NULL, ...) {
8989
#' @param ... these arguments are documented at
9090
#' \url{https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js}
9191
#' @param collaborate include the collaborate mode bar button (unique to the R pkg)?
92-
#' @param cloud include the send data to cloud button?
9392
#' @param locale locale to use. See [here](https://github.com/plotly/plotly.js/tree/master/dist#to-include-localization) for more info.
9493
#' @param mathjax add [MathJax rendering support](https://github.com/plotly/plotly.js/tree/master/dist#to-support-mathjax).
9594
#' If `"cdn"`, mathjax is loaded externally (meaning an internet connection is needed for
@@ -169,7 +168,5 @@ config <- function(p, ..., collaborate = TRUE, cloud = FALSE, locale = NULL, mat
169168
p$x$config[["modeBarButtonsToAdd"]][nms %in% sharingButton()[["name"]]] <- NULL
170169
}
171170

172-
p$x$config$cloud <- cloud
173-
174171
p
175172
}

inst/htmlwidgets/plotly.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@ HTMLWidgets.widget({
148148
}
149149
}
150150

151-
// remove "sendDataToCloud", unless user has specified they want it
152-
x.config = x.config || {};
153-
if (!x.config.cloud) {
154-
x.config.modeBarButtonsToRemove = x.config.modeBarButtonsToRemove || [];
155-
x.config.modeBarButtonsToRemove.push("sendDataToCloud");
156-
}
157-
158151
// if no plot exists yet, create one with a particular configuration
159152
if (!instance.plotly) {
160153

man/config.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)