Skip to content

Commit 109e4ff

Browse files
committed
Fix sf issue
1 parent 8afa46f commit 109e4ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

R/layers2traces.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,6 @@ split_on <- function(dat) {
986986
GeomPath = c("fill", "colour", "size", "linewidth"),
987987
GeomPolygon = c("fill", "colour", "size", "linewidth"),
988988
GeomBar = "fill",
989-
# TODO: add linetype here?
990989
GeomBoxplot = c("colour", "fill", "size"),
991990
GeomErrorbar = "colour",
992991
GeomErrorbarh = "colour",
@@ -1084,7 +1083,7 @@ aes2plotly <- function(data, params, aes = "size") {
10841083
# Hack to support this geom_sf hack
10851084
# https://github.com/tidyverse/ggplot2/blob/505e4bfb/R/sf.R#L179-L187
10861085
defaults <- if (inherits(data, "GeomSf")) {
1087-
type <- if (any(grepl("point", class(data)))) "point" else if (any(grepl("line", class(data)))) "line" else ""
1086+
type <- if (any(grepl("[P-p]oint", class(data)))) "point" else if (any(grepl("[L-l]ine", class(data)))) "line" else ""
10881087
ggfun("default_aesthetics")(type)
10891088
} else {
10901089
geom_obj <- ggfun(geom)

0 commit comments

Comments
 (0)