SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components



I’m using SciChartGroup with SciChartSurface, each surface contains a set of modifiers, but when I add both CursorModifier and ZoomPanModifier at the same time, the ZoomPanModifier stops working.

<s:SciChartGroup ItemsSource="{Binding ChartPaneViewModels}">
            <s:SciChartSurface SeriesSource="{Binding ChildPane.SeriesViewModels}">

                        <s:CursorModifier />
                        <s:RubberBandXyZoomModifier ExecuteOn="MouseRightButton" IsXAxisOnly="True"/>-->
                        <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                        <s:ZoomPanModifier ExecuteOn="MouseLeftButton" ClipModeX="None"/>
                    <s:CategoryDateTimeAxis AxisAlignment="Bottom" VisibleRange="{Binding ChildPane.Range, Mode=TwoWay}"/>

                    <s:NumericAxis AutoRange="Always" AxisAlignment="Right">
                            <s:DoubleRange Max="0.1" Min="0.1"/>


Error reproduced on SciChart version 2.2 and 2.3, on version 1.x it worked fine.

  • You must to post comments
Best Answer

Hi there,

Please see our KB article on How to Add Mouse Interaction to SciChart, the section on ChartModifier Precedence and Handled mouse events.

ChartModifier Precedence (Handled Events)

ChartModifiers obey a precedence, rather like WPF RoutedEvents. If you have a number of modifiers in a SciChartSurface, then the first modifier that handles an event marks it as e.Handled. Subsequent modifiers will not receive the event.

For instance, consider the following code:


If you drag the chart, then the series will not be selected too, because the RubberBandXyZoomModiifer marks MouseUp as Handled. The SeriesSelectionModifier relies on MouseUp to select. If the event is handled then it will not select.

So far this is all intuitive and good. But what about this case?


Working around event handling with ReceiveHandledEvents

The solution to the above problem is to set ReceiveHandledEvents=True on a modifier. This way the modifier will receive all events, even those marked as handled. Try the following code for instance:


Be careful with this flag though as it could enable event handling where it should not occur.

  • esper
    Yes, it helped. Thanks.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.