C1Chart contains built-in tools that simplify the implementation of interactive behaviors for the end user. The end user can explore, rotate and zoom chart using combinations of mouse and shift keys. The control center for interactive features is the Actions property of C1Chart. The Action object has several properties that allow customization of the interface. All of the properties can be set or changed at design time through the Properties window with the Action Collection Editor or in XAML and programmatically through the Actions collection.
The following XAML shows how to set the Actions properties to enable end user interaction:
XAML |
Copy Code
|
---|---|
<c1:C1Chart.Actions> <c1:ZoomAction /> <c1:TranslateAction Modifiers="Shift" /> <c1:ScaleAction Modifiers="Control" /> </c1:C1Chart.Actions> |
The following code shows how to programmatically set the Actions properties through the C1Chart.Actions collection:
C# |
Copy Code
|
---|---|
c1.Chart.Actions.Add(new ZoomAction());
|
The following list reveals the supported chart actions:
Note: The zoom is not applicable for the chart's axis if the MinScale property is equal to zero. The MinScale property specifies the minimum scale that can be set for the axis.
Note: You will not be available to translate along the axis if the Axis.Scale property is greater than 1.
Note: The zoom is not applicable for the chart's axis if the MinScale property is equal to zero. The MinScale property specifies the minimum scale that can be set for the axis.
The scaling, translation and zooming are available only for chart with Cartesian axes.
Interactive rotation at run time is available for 3D Charts (WPF Only).
The Action object provides a set of properties that help to customize the action's behavior.