From 88f3869604d7767469a63c63dee54cceeff0f621 Mon Sep 17 00:00:00 2001 From: Carson Date: Fri, 7 Oct 2022 10:13:17 -0500 Subject: [PATCH] plotlyOutput()'s width and height now default to NULL (and default CSS sizing is provided using a non-inline style) --- R/shiny.R | 2 +- inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/R/shiny.R b/R/shiny.R index 6f9e66a521..d5b8f2e78d 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -23,7 +23,7 @@ #' @name plotly-shiny #' #' @export -plotlyOutput <- function(outputId, width = "100%", height = "400px", +plotlyOutput <- function(outputId, width = NULL, height = NULL, inline = FALSE, reportTheme = TRUE) { args <- list( outputId = outputId, diff --git a/inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css b/inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css index f35906d52c..6e2ced6428 100644 --- a/inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css +++ b/inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css @@ -1,3 +1,8 @@ +.plotly.html-widget { + width: 100%; + height: 400px; +} + /* just here so that plotly works correctly with ioslides.