plotly / plotly/plotly.js

[BUG]: Background image is rendered at an incorrect size after box zoom followed by mouse wheel zoom out

Open
#7,914 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue good for agent P2 size: 1
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Description

On charts containing a background image with xref: "x" and yref: "y", performing a box zoom followed by a manual zoom out causes the background image to be rendered with an incorrect size and position. It no longer matches the coordinate system defined by xref and yref.

Screenshots/Video

https://github.com/user-attachments/assets/08c53c01-0fca-4845-8b59-06e837382884

Steps to reproduce

Here https://codepen.io/JulienIcon/pen/QwdBypd, try to box zoom a small part of the chart and then try to manually zoom out using the mouse wheel

Notes

If the zoom is reset using the default double-click interaction, the background image is rendered correctly again.

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

Reproduce the issue using the linked CodePen: box zoom a small chart region, then zoom out with the mouse wheel, and compare the background image against its x/y coordinate references. Trace the background-image rendering and zoom interaction paths, then confirm the image keeps the correct size and position after manual zoom-out, while double-click reset remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.