Skip to content

Commit 2062096

Browse files
authored
plotlyOutput()'s width and height now default to NULL (and default CSS sizing is provided using a non-inline style) (#2192)
1 parent 3eed83e commit 2062096

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

R/shiny.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' @name plotly-shiny
2424
#'
2525
#' @export
26-
plotlyOutput <- function(outputId, width = "100%", height = "400px",
26+
plotlyOutput <- function(outputId, width = NULL, height = NULL,
2727
inline = FALSE, reportTheme = TRUE) {
2828
args <- list(
2929
outputId = outputId,

inst/htmlwidgets/lib/plotlyjs/plotly-htmlwidgets.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.plotly.html-widget {
2+
width: 100%;
3+
height: 400px;
4+
}
5+
16
/*
27
just here so that plotly works
38
correctly with ioslides.

0 commit comments

Comments
 (0)