Default frame size with `highlight(..., selectize = TRUE)`
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
The frame of plots with the selectize.js widget are by default not well scaled. The y-axis is not visible.
Example:
library(tidyverse)
library(plotly)
p <- iris %>%
highlight_key(~Species) %>%
ggplot(aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
geom_point()
pp <- ggplotly(p, tooltip = "Species")
highlight(pp, selectize = TRUE)

It is possible to adjust the layout with
highlight(pp, selectize = TRUE) %>% layout(autosize = FALSE, width = '100%', height = '100%')
but maybe a better default would be good?
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 provided iris example with highlight(pp, selectize = TRUE) and compare it with the layout(autosize = FALSE, width = '100%', height = '100%') workaround. Trace the highlight(..., selectize = TRUE) entry point and determine whether the default frame should keep the y-axis visible without that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100