Interactive facets in ggplotly
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Currently a plot like this:
library(reshape2)
library(plotly)
p <- ggplot(tips, aes(x=total_bill, y=tip/total_bill)) + geom_point(shape=1)
p <- p + facet_wrap( ~ day, ncol=2)
fig <- ggplotly(p)
fig
does not have any interactive elements for the facets. A few improvements would be:
- Show a dropdown list with the title of the facets to allow selecting one facet or "All" (there does not seem to be an easy way nor an example to do this)
- Click in the facet title shows only that subplot (zooms). The user can reset the zoom as usual.
- Show a list of facet title that work similar to the legend: single-click shows/hides the facet, double-click shows only this facet/shows all facets.
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 issue's R example with ggplotly(p), facet_wrap, and the tips data to reproduce the current facet behavior. Review how ggplotly represents faceted subplots and determine which of the three proposed interaction patterns is intended; done requires an agreed facet interaction with working selection or visibility behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100