Allow on/off to accept multiple values
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Code:
library(plotly)
library(crosstalk)
D <- SharedData$new(iris, key = ~Species)
scatter <- ggplot(data=D, aes(x = Sepal.Length, y = Sepal.Width))
p <- scatter + geom_point(aes(color=Species, shape=Species)) +
xlab("Sepal Length") + ylab("Sepal Width") +
ggtitle("Sepal Length-Width")
highlight(ggplotly(p), on = "plotly_selected", off = 'plotly_deselect')
Step 1, I select the red group:

Step 2, I click somewhere else in the plot: (here is the BUG, it acts the same as off = 'plotly_doubleclick' )

Using double click releases the fading.
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 by running the supplied R example with highlight(ggplotly(p), on = "plotly_selected", off = "plotly_deselect") and compare it with the double-click behavior described. Trace how highlight handles the on and off arguments; done means multiple values are accepted and clicking elsewhere no longer behaves like plotly_doubleclick.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100