Skip to content

Commit 288c86e

Browse files
authored
Merge pull request #1382 from ropensci/colorbar-hoverinfo
use hoverinfo skip instead of none for invisible ggplotly() colorbar trace, closes #1381
2 parents 7031a25 + 9991c2e commit 288c86e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/ggplotly.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ gdef2trace <- function(gdef, theme, gglayout) {
13001300
type = "scatter",
13011301
mode = "markers",
13021302
opacity = 0,
1303-
hoverinfo = "none",
1303+
hoverinfo = "skip",
13041304
showlegend = FALSE,
13051305
# do everything on a 0-1 scale
13061306
marker = list(

tests/testthat/test-ggplot-sf.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_that("geom_sf() polygons with fill/text.", {
5454
# one trace for every fillcolor, one for graticule, one for colorbar
5555
expect_length(l$data, length(unique(nc$AREA)) + 2)
5656
expect_true(
57-
all(unlist(lapply(l$data, "[[", "hoverinfo")) %in% c("none", "text"))
57+
all(unlist(lapply(l$data, "[[", "hoverinfo")) %in% c("skip", "none", "text"))
5858
)
5959
# graticule styling should inherit from panel.grid.major
6060
expect_equivalent(

0 commit comments

Comments
 (0)