$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Chart Control for C# Windows Forms
Chart features of scroll and zoom, selection, tooltip, trackball, title, legend, smart labels, drill down
Home > WinForms UI Controls > User Manual > Chart Scroll and Zoom in C#

Scroll and Zoom in Chart for WinForms C# Tutorial

The WinForms Chart Control provides zoom and scroll functionalities for designing Chart in C# Windows Forms applications. To create scroll and zoom for Chart, developers need use the class named ChartPanZoomController. The zoom functionality is provided for Chart users to zoom the chart area when there is a large of data points that may be displayed too close to read by human eyes at the normal chart scale. The scroll functionality is provided for users to move the displayed visible chart area. To create scroll and zoom features for Chart in C# Windows Forms applications, developers need add the Chart control to the chart's Controllers collection and customize the zoom mode.
The following C# code shows how to customize the scroll and zoom mode for Chart in Windows Forms projects.

ChartPanZoomController panZoomController = new ChartPanZoomController();
panZoomController.PanZoomMode = ChartPanZoomMode.Horizontal;
chart1.Controllers.Add(panZoomController);
When the value of DisplayPanZoom property is set to true, the ChartPanAndZoomController will be added automatically. Here the PanZoomMode is Horizontal that is the default value

chart1.DisplayPanZoom = true;

Properties and Values of Scroll and Zoom for Chart

  • PanZoomMode , this is the property used to restrict zooming of the Chart area.
  • Both , a valid value of PanZoomMode, when set the properties as to Both value, it will remove all restrictions, and users can zoom the chart in both the horizontal and vertical axes.
  • Horizontal , a valid value of PanZoomMode, when set the properties as to Horizontal value, it will restrict the behavior in horizontal direction.
  • Vertical , a valid value of PanZoomMode, when set the properties as to Vertical value, it will restrict the behavior in vertical direction.
  • Zoom and Pan , the methods used to customize the zoom and pan values of the Chart
When customizing the values of the scroll and zoom feature for Chart, the offset should be provided in negative absolute values. And when users need to zoom in and zoom out the chart area, they can use the Ctrl key and Mouse Wheel to control the zoom factor. The pan and scroll functionality can be controlled by the Mouse Left Button with Down or Move key.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls