Skip to content

Commit 0e373f2

Browse files
committed
leverage fill hover in dt demo
1 parent 17fd25b commit 0e373f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

demo/sf-mapbox-dt.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ library(crosstalk)
44
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
55
ncsd <- SharedData$new(nc)
66

7-
map <- plot_mapbox(ncsd, text = ~CNTY_ID, hoverinfo = "text") %>%
8-
highlight(persistent = TRUE) %>%
9-
layout(title = "Click on counties to query them") %>%
7+
map <- plot_ly(ncsd, split = ~NAME, color = I("gray"), hoveron = "fill") %>%
8+
highlight(persistent = TRUE, color = "red", opacityDim = 1) %>%
9+
layout(title = "Click on counties to query them", showlegend = FALSE) %>%
1010
config(displayModeBar = FALSE)
1111

1212
bscols(map, DT::datatable(ncsd))

0 commit comments

Comments
 (0)