ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Interaction / Enabling Run-Time Interaction for 2D Charts
In This Topic
    Enabling Run-Time Interaction for 2D Charts
    In This Topic

    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 markup below defines a set of actions.

    XAML
    Copy Code
    <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.

     

    See Also