Zoom in by dragging a rectangle by mouse?

Oystein Bjorke 6 years ago updated by Joey 4 years ago 1
This discussion was imported from CodePlex

Christoph1972 wrote at 2014-02-13 06:07:


I'm new at CodePlex and interested in OxyPlot.

Is there a way to zoom in by dragging a rectangle by mouse? By Zedgraph is it a basic setting.

Google shows me only this: http://searchcode.com/codesearch/view/28445967

But I have no idea to use it. Is it what I'm looking for?

Sorry for my poor English, I'm from Germany.

Kind Reguards

everytimer wrote at 2014-02-13 20:07:

By default you can use the wheel click to draw a rectangle and zoom in it. You can also do that on the axes, selecting the desired range that way.
Double wheel click autoadjusts the view. Good luck!


There is way to use mouse to do RectangleZoom.

1. unbind the default response of your left button in your actual controller, just like this:


2. bind the RectangleZoom command to this controller:

this.View.ActualController.BindMouseDown(OxyMouseButton.Left, PlotCommands.ZoomRectangle);

that's all.

sorry for my poor English, I'm from Chinese ;)

if there's still any problem, you can contract me with my wechat:S592063