plotly / plotly/plotly.js

Range Slider flips mirror-like when viewport gets narrow

Open
#6,493 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

I have encountered a strange behavior where, no matter what chart or data I am using, when the range slider doesn't have any space on the y axis, (this can happen when the y axis labels are wide) it flips like in a mirror:

In the first image the Year 2000 is the white dot on the left
1
In the second image the Year 2000 is the white dot on the right
2

I've modified the Adding Sliders to Animations in JavaScript example: https://codepen.io/bleah1/pen/dyqoaMQ and added responsive: true to config and a big margin of 400 to the layout to better see the flipping in action.

What now ? This obviously can't be used on narrow mobile screens.

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 with the modified “Adding Sliders to Animations in JavaScript” example linked in the issue, using responsive mode and the large layout margin to reproduce the flip when y-axis labels consume the available width. Trace the range slider behavior at that narrow viewport and verify that the Year 2000 marker keeps the same side and orientation; the issue names no repository file or test to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.