In WinForm, set the sensitivity of the mouse wheel zoom of ZedGraph and the way to set the wheel zoom (whether the mouse focus is the center or the center of the graph)

Time:2019-12-29

scene

In winforn, set the properties of ZedGraph curve, coordinate axis and scale:

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100112573

Multiple Y axes of ZedGraph are implemented in WinForm (download with source code):

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100132245

On the graph, when the mouse wheel zooms, there are two ways to zoom:

Zooms around the focus of the mouse.

Zoom to the center of the drawing.

And you can also set its sensitivity when scaling.

Note:

Blog home page:
https://blog.csdn.net/badao_liumang_qizhi

Pay attention to the public address
Domineering procedural ape
Get programming related ebooks, tutorials and free downloads.

Realization

The default zoom method is to zoom at the center of the drawing, if you want to change to zoom with the mouse focus as the center.

zgc.IsZoomOnMouseCenter = true;

 

Of which zgc:

ZedGraphControl zgc

 

If you want to change its zoom sensitivity

Set its zoomstepfraction property

 

 

Zgc.zoomstepfraction = 0.05; // the higher the mouse sensitivity value is, the more sensitive it is