Enabling Run-Time Interaction for the 2D Cartesian Chart

The action for zooming, scaling, and translating is invoked by the specified mouse button with optional keyboard modifiers (Alt|Ctrl|Shift). The actions should be placed in the Actions collection. The following XAML code below defines a set of actions.

 

<c1chart:C1Chart.Actions>

<!-- use left mouse button to scroll through data -->

<c1chart:TranslateAction MouseButton="Left" />

<!-- use ctrl+left mouse button to change scale -->

<c1chart:ScaleAction MouseButton="Left" Modifiers="Ctrl"/>

<!-- use shift+left mouse to zoom selected rectangular area-->

<c1chart:ZoomAction MouseButton="Left" Modifiers="Shift" />

</c1chart:C1Chart.Actions>

 

The actions are closely related with Axis properties(Min, Max, Scale, MinScale). When Axis.Scale=1 the translate action is not available along the axis. The MinScale sets limitation of zoom or scale that can be achieved during action.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.