Zoom and Scroll a Chart
Cartesian Charts support scroll and zoom operations. Users can scroll a chart along argument and value axes to pan a chart horizontally and vertically. Users can also zoom into or out of a chart.
#Allow Users to Zoom a Chart
Set the CartesianChart.AllowAxisXZoomScroll and CartesianChart.AllowAxisYZoomScroll properties to true to allow users to zoom and scroll a chart along argument and value axes respectively.
In markup:
<Charts:CartesianChart x:Name="chart" AllowAxisYZoomScroll="True" AllowAxisXZoomScroll="True" ...>
<!--Other settings-->
</Charts:PieChart>
In code:
#End-User Capabilities
Users can utilize mouse operations and touch gestures to zoom and scroll a chart.
#Actions to Zoom a Chart
Action | Effect |
---|---|
Mouse Wheel | Move the mouse cursor over a diagram and spin the mouse scroll wheel to zoom in/out. |
Spread / Pinch Gestures | The spread and pinch gestures zoom into and out of a diagram on touchscreen devices. |
#Actions to Scroll a Chart
Action | Effect |
---|---|
Pan the chart | Move the mouse cursor with the right mouse button pressed to scroll the diagram. |
Use scroll bars | |
Use flick gestures | Flick gestures scroll the diagram on touchscreen devices. |