Chart for WinRT
Enable Scale DoubleTap and Pinch Behavior

In addition to translation you can also enable scaling, which enables the user to zoom in on the plot area. You can enable scaling for both pinch and double-tap gestures. For example, the user can double tap to zoom-in and then pinch to zoom in/out. For example, to enable scaling for both double tap and pinching gestures add the following code:

 

C#
Copy Code
// initialize scroll bars
c1Chart1.View.AxisX.ScrollBar = new AxisScrollBar();
c1Chart1.View.AxisY.ScrollBar = new AxisScrollBar(); 
// remove any action update delay
c1Chart1.ActionUpdateDelay = 0; 
// set manipulation mode to scale and translate
c1Chart1.ManipulationMode = ManipulationModes.Scale | // scale without inertia
    ManipulationModes.TranslateX | // translate x axis
    ManipulationModes.TranslateY | // translate y axis
    ManipulationModes.TranslateInertia; // translate with inertia 
// assign translate action to slide gesture
c1Chart1.GestureSlide = GestureSlideAction.Translate; 
// assign scale action to double tap and pinch gestures
c1Chart1.GestureDoubleTap = GestureDoubleTapAction.Scale;
c1Chart1.GesturePinch = GesturePinchAction.Scale;
   

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback