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.