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.
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
Properties and Values of Scroll and Zoom for 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