Pre loader

Same zooming and panning on axes as on the chart.

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums



I am evaluating SciChart (for info : v 2.3) for integration into a WPF application. For the application is important that the user can interact with the chart.

So I have been trying to get that working with SciChart : with the MouseWheelZoomModifier we can use the mouse wheel to zoom the chart and with ZoomPanModifier we can use the left-mouse button to pan the chart. Excellent !

But then we would like to have the same behavior on the axes : Mouse wheel to zoom an axis and left-mouse button to move it up and down. Until now I found only the XAxisDragModifier to make an axis interactive but that has a quite different behavior.

So my question is : How can I get the same zooming and panning behavior on the axes ?

thanks in advance for any help,

  • You must to post comments

Hi Stefaan,

I believe that MouseWheelModifier has zoom and pan in X or Y direction when you hold down SHIFT or CTRL while mouse-wheeling. Can you try that?

I believe there are some more properties on MouseWheelZoomModifier which can be adjusted to change its behaviour.

/// <summary>
/// Gets or sets the <see cref="ActionType"/> to perform on mouse-wheel interaction
/// </summary>
public ActionType ActionType
    get { return (ActionType)GetValue(ActionTypeProperty); }
    set { SetValue(ActionTypeProperty, value); }

where ActionType has values of Zoom, Pan. Try playing with that. If you have to you can also dynamically switch ActionType if the user is holding down CTRL.

Alternatively, you can create your own modifier! Our framework allows you to extend or create your own chart interations. Take a look at this forum post for inspiration



  • srillaert
    Thanks Andrew, this certainly helps. :-) The code of Ross gives me a good starting pointing for the zooming on an axis and your code sample on the same thread allows me to extend it to multiple X or Y axes. Nice ! Once that is done I can also add the panning, but actually the zooming on an axis was the most important for us. By the way, I tried the SHIFT and CTRL with the MouseWheelModifier and these keys pan the chart in the X or Y direction. Have a nice evening, Stefaan
  • Andrew Burnett-Thompson
    Great! Glad it helped you. Best regards, Andrew
  • srillaert
    Hello Andrew, thanks again for the input ! I tried the ActionType but it only affects the behavior *without* the CTRL or SHIFT key being pressed. When one of these keys is pressed the MouseWheelZoomModifier is always doing panning, also when ActionType="Zoom" (at least with the version I am using, v2.3). Another solution for me might be to dynamically change the XyDirection when the user is holding CTRL or SHIFT. But I still go for the custom ChartModifier, the reason is that there are two YAxes (left and right) that the user wants to zoom independently and that works great with a quick and dirty adaptation :-) (until now it is only prototyping) of the code of Ross and you. Cheers, Stefaan
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies