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 DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlChart PropertyChart GridChart Series TypesChart Series - AreaChart Series - BarChart Series - LineChart Series - ScatterChart Series - ScatterLineChart Series - PieChart Series - DonutChart Series - PolarChart Series - RadarChart AxesChart Axes - CategoricalChart Axes - DateTimeChart Axes - LinearChart Axes - LogarithmicChart Axes - PolarChart Axes - PlotModeChart Axes - RadicalChart Axes - Multiple AxesChart FeatureChart - Scroll and ZoomChart - SelectionChart - TooltipChart - TrackballChart - TitleChart - LegendChart - Smart LabelsChart - Drill DownChart Data BindingChart Custom PaletteChart Custom RenderingWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |