Skip to content

Scroll zoom does not work properly when automargin is enabled. #7449

Open
@pawel-paciorek-at-metrohm

Description

Scroll zoom does not work properly when automargin is enabled. Graphical side effects are visible during zoom in/out. In contrast to #7440, the side effect occurs regardless of the autorange property settings and during typical zoom in/out operations.

See the provided example of the scatter plot chart:

  • Scrolling zoom (mouse wheel) is enabled (with scrollZoom property).
  • Auto margin is enabled (with automargin properties).
  • (The grids and axes are visualised for better understanding the issue.)

https://codepen.io/zabka5/pen/ogXJmvr

Use the mouse wheel to zoom in (firstly) and out to give a chance of the plotted data to be cropped within the chart view. Depends on the zooming direction, the following effects can be observed:

  • while zooming in the plotted trace exceeds the clipping area defined by the X and Y axes i.e. it is bigger than expected, but after a while, plotting is corrected,
  • while zooming out the plotted trace is smaller than the clipping area defined by the X and Y axes but after a while, plotting is corrected.

Moreover, regardless of the zooming direction, a kind of "range flickering" can be observed on the axes.

Perform this action back and forth, faster, so that the effect is stronger.

I have attached a short recording to demonstrate the situation:
https://github.com/user-attachments/assets/53ebe327-0310-4b6c-9c99-5b00be5d823b

Interestingly, the problem sometimes (!?) disappears after ... some time, only to reappear after regular refreshing of the page.

Final summary: the effect is similar to the one reported in #7440, but it is even more annoying because it occurs during typical user activity..

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions