Color markers upon hover linked leaflet map highlight()
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
I am wondering if there is a way to make the highlighted (from hover) dot change color, on both the linked leaflet map as well as the scatter plot? In other words, can the blue dot turn to a red dot, on both map and chart, upon hover?
Thanks!
library(leaflet)
eqs <- highlight_key(quakes)
p <- plot_ly(eqs, x = ~depth, y = ~mag) %>%
add_markers(alpha = 0.5) %>%
highlight("plotly_hover", opacityDim = .1)
map <- leaflet(eqs) %>%
addTiles() %>%
addCircles(opacity = 1)
bscols(
widths = c(6, 6),
p, map
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided R example using highlight(), add_markers(), leaflet(), addCircles(), and bscols(). Read the existing linked plotly and leaflet highlight behavior, then define whether hover state can synchronize marker colors in both views; done means the hovered point changes color on the scatter plot and map.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- plotly, r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100