Skip to content

Commit 34c51b3

Browse files
authored
Merge pull request #1482 from ropensci/fix-grid
don't supply axis domain defaults if layout.grid is specified
2 parents 71bb5d2 + 8f794c9 commit 34c51b3

File tree

7 files changed

+21
-2
lines changed

7 files changed

+21
-2
lines changed

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ supply_defaults <- function(p) {
348348
p$x$layout[[p$x$layout$mapType]] <- modify_list(
349349
list(domain = geoDomain), p$x$layout[[p$x$layout$mapType]]
350350
)
351-
} else {
351+
} else if (!length(p$x$layout[["grid"]])) {
352352
types <- vapply(p$x$data, function(tr) tr[["type"]] %||% "scatter", character(1))
353353
axes <- unlist(lapply(types, function(x) {
354354
grep("^[a-z]axis$", names(Schema$traces[[x]]$attributes), value = TRUE) %||% NULL

tests/figs/plotly/errorbar-width.svg

Lines changed: 1 addition & 0 deletions
Loading

tests/figs/plotly/layout-grid.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)