plotly / plotly/plotly.js

Scatter3D does not remember its visual state in certain conditions

Open
#5,560 4 comments 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

Visual state is zoom level, orientation, position, etc...
Checking for saving state: simply click on one of this control buttons: image or call Plotly.restyle. None of these actions should change the visual state.

Bugs briefly:

  1. Mouse wheel zooming not saving last zoom lvl (always reverted to previous zoom lvl).
  2. Touch pad zooming/rotating/moving not saved at all.

Сonditions under which the visual state is not preserved:

Zoom without mouse click - by mouse wheel.
Each odd iteration of zoom level with mouse wheel - will not be remembered. Why odd? Because plotly will save previous zoomlvl after next zoom. In other words - mouse wheel zoomlvl will be reverted 1 step back after restyle or other refresh actions.

https://user-images.githubusercontent.com/17767561/111899838-13396280-8a40-11eb-87ba-4849c2602679.mp4

This make mouse wheel zooming not usable with updating by time interval (Plotly.restyle) plots. Side note - if your click any where in the plot after mouse wheel zoom - zoomlvl will be stored.

Any plot manipulation with touch pad.
Here same behavior - touch any where in the plot after manipulating - will store visual state. See video below.

https://user-images.githubusercontent.com/17767561/111899939-bc805880-8a40-11eb-9d72-be0d15e8e907.mp4

Repro: https://codepen.io/k_sze/pen/WXgNoJ (from #2181). You can click buttons or call restyle() function in console.

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 linked CodePen reproduction and test Scatter3D interactions followed by Plotly.restyle or control-button updates. Trace the visual-state handling for mouse-wheel and touch-pad changes; done means zoom, orientation, and position remain at their latest values after refresh actions.

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.