Xceed Chart for WinForms v4.4 Documentation
Data Panning

Welcome to Xceed Chart for WinForms v4.4 > User Guide > Interactivity > Drag Operations > Data Panning

The Data Pan feauture allows you to scroll the chart contents using the mouse when the chart axes are configured to use paging (which is the case after a Data Zoom operation for example). This feature works with both GDI+ and OpenGL devices and does not depend on the applied projection. 

You enable the data pan feature by adding an object of type DataPanTool to the InteractivityOperationsCollection of the control, accessible via the InteractivityOperations property:

VB.NET  

Dim dataPanTool As DataPanTool =  New DataPanTool()

chartControl1.InteractivityOperations.Add(dataPanTool)

C#  

DataPanTool dataPanTool = new DataPanTool();

chartControl1.InteractivityOperations.Add(dataPanTool);

Configuring the axes on which the data pan tool operates is done in exactly the same manner as we've seen in the topics dedicated to the DataZoom and DataCursor tools, so we won't go into details. 

The DataPan tool has a property called RepaintChartWhileDragging, which when set to true forces the control to repaint while dragging occurs. This leads to better visual feedback for the user at the expense of a higher CPU load. This property is enabled by default, but you can disable it at any time:

VB.NET  
dataPanTool.RepaintChartWhileDragging = False
C#  
dataPanTool.RepaintChartWhileDragging = false;

See Also

DataPanTool