Skip to content

Commit 9400d1b

Browse files
committed
clear out NULL height/width (for polar)
1 parent 9e716df commit 9400d1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/plotly_build.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ plotly_build.plotly <- function(p) {
249249
}
250250
}
251251

252+
# polar charts don't like null width/height keys
253+
if (is.null(p$x$layout[["height"]])) p$x$layout[["height"]] <- NULL
254+
if (is.null(p$x$layout[["width"]])) p$x$layout[["width"]] <- NULL
255+
252256
# ensure we get the order of categories correct
253257
# (plotly.js uses the order in which categories appear by default)
254258
p <- populate_categorical_axes(p)

0 commit comments

Comments
 (0)