Chart for .NET / User's Guide / Interactivity / Drag Tools / Zoom

In This Topic
    Zoom
    In This Topic

    The zoom tool enables the end user to change the zoom factor of the NProjection object attached to the current chart by simply pressing the left mouse button over the chart and then dragging the mouse. When the user drags the mouse towards the top control edge the control will zoom out and when the user drags the mouse towards the bottom edge the control will zoom out.

    You enable zooming by adding a NZoomTool to the Tools collection of the NController:

    C#
    Copy Code
    chartControl.Controller.Tools.Add(new NSelectorTool());
    chartControl.Controller.Tools.Add(new NZoomTool());
    
    Visual Basic
    Copy Code
    chartControl.Controller.Tools.Add(New NSelectorTool)
    chartControl.Controller.Tools.Add(New NZoomTool)
    

    The NZoomTool will raise the ZoomChanged event when the zoom changes.

     Related Examples
    Windows forms: Interactivity\Drag Operations
    See Also