ChartMouseAction Class
The action used to assign a shortcut to the scrolling, zooming or selection operation within the chart.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
Related API Members
The following members return ChartMouseAction objects:
Remarks
Specify the ChartMouseAction.MouseButton and ChartMouseAction.ModifierKeys properties to define the action.
Use the ChartMouseAction object to configure the following actions:
- RotationOptions.MouseAction
- ZoomingOptions.ZoomInMouseAction
- ZoomingOptions.ZoomOutMouseAction
- ZoomingOptions2D.ZoomToRectangleMouseAction
- ScrollingOptions.ScrollMouseAction
- SelectionOptions.MouseAction
- XYSelectionOptions.RectangleSelectionMouseAction
- DrillDownOptions.DrillDownMouseAction
Example
This example shows how to specify actions to zoom in and zoom out of the chart:
To configure the action, use the ChartMouseAction.ModifierKeys and ChartMouseAction.MouseButton properties.
XYDiagram diagram = chartControl.Diagram as XYDiagram;
if(diagram != null) {
diagram.ZoomingOptions.ZoomInMouseAction.ModifierKeys = ChartModifierKeys.Control;
diagram.ZoomingOptions.ZoomInMouseAction.MouseButton = MouseButtons.Right;
diagram.ZoomingOptions.ZoomOutMouseAction.ModifierKeys = ChartModifierKeys.Shift;
diagram.ZoomingOptions.ZoomOutMouseAction.MouseButton = MouseButtons.Right;
}
Inheritance
Object
ChartElement
ChartMouseAction
See Also