plotly / plotly/plotly.js

Dragmode false not working for horizontal scroll

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

Nobody has claimed this yet.

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

Description

This relates to #2844 which got partially solved by #3170 .
My problem is that dragmode = false should enable both horizontal and vertical scroll.
However, horizontal scrolling is not fully working.
In the case of a plot that is wider than the page, horizontal scrolling is not possible on a mobile device, if one tries to scroll within the axes. I want only the plot area to scroll, without the whole page overflowing the screen horizontally. That is why I arranged the divs in this way. I think this is a common use case.
Please check the following example on a mobile device:

https://codepen.io/maxnrw/pen/BaqGEYv

I tried to make it as simple as possible.

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 reproducing the CodePen example on a mobile device and compare the behavior with the context in issues #2844 and #3170. Trace how dragmode=false handles scrolling inside the axes. Done means horizontal scrolling works within the plot area without causing page-wide horizontal overflow, while vertical scrolling remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
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.