plotly / plotly/plotly.R

Default frame size with `highlight(..., selectize = TRUE)`

Open
#2,239 0 comments 0 reactions 0 assignees View on GitHub

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)

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.