Skip to content

Add mouse wheel zoom support for Y-axis#798

Open
ashutosh-trader wants to merge 2 commits into
klinecharts:mainfrom
gt-core:os/y-axis-zoom
Open

Add mouse wheel zoom support for Y-axis#798
ashutosh-trader wants to merge 2 commits into
klinecharts:mainfrom
gt-core:os/y-axis-zoom

Conversation

@ashutosh-trader

Copy link
Copy Markdown

Summary

Add support for zooming the Y-axis using the mouse wheel, allowing users to quickly adjust the vertical scale without dragging.

Changes

  • Add mouse wheel zoom handling for Y-axis widget in mouseWheelVertEvent
  • Extract Y-axis zoom logic into reusable _zoomYAxis private method
  • Reuse the same zoom logic for both drag-to-scale and scroll-to-zoom interactions

Behavior

When the mouse is over the Y-axis and scrollZoomEnabled is true:

  • Scrolling up zooms in (decreases range)
  • Scrolling down zooms out (increases range)

This matches the existing zoom behavior on the main chart area and provides a more intuitive way to adjust the Y-axis scale.

@ashutosh-trader

Copy link
Copy Markdown
Author

closed PR #787 to add mouse wheel / touch scroll support

@ashutosh-trader

Copy link
Copy Markdown
Author

@liihuu please review this , I have tested this to be working fine using both mousewheel and touchbar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants