Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ rangeslider <- function(p, start = NULL, end = NULL, ...) {
#' @export
#' @examplesIf interactive() || !identical(.Platform$OS.type, "windows")
#'
#' # remove the plotly logo and collaborate button from modebar
#' config(plot_ly(), displaylogo = FALSE, collaborate = FALSE)
#' # remove the plotly logo and 2D lasso option from modebar
#' config(plot_ly(), displaylogo = FALSE, modeBarButtonsToRemove = list("lasso2d"))
#'
#' # enable mathjax
#' # see more examples at https://plotly.com/r/LaTeX/
Expand Down
4 changes: 2 additions & 2 deletions man/config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tests/testthat/test-plotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ test_that("Informative deprecation message for titlefont", {
expect_warning(config(plot_ly(), cloud = TRUE), "cloud")
})

test_that("Informative deprecation message for collaborate", {
p <- plot_ly(x = 1:3, mode = "markers", type = "scatter")
expect_warning(config(p, collaborate=TRUE), regexp = "collaborate button")
expect_warning(config(p, collaborate=FALSE), regexp = "collaborate button")
})

test_that("Informative warning for invalid config attr", {
p <- config(plot_ly(), foobar = TRUE)
expect_warning(plotly_build(p), "foobar")
Expand Down