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

0
0

Hi.

I use MouseWheelZoomModifier. If some modifier key pressed (Ctrl, Shift, Alt) it produces scroll instead of zoom. My X axis is styled as follows:

<Style TargetType="s:DateTimeAxis">
            <Setter Property="TextFormatting" Value="dd-MM-yyyy"/>
            <Setter Property="SubDayTextFormatting" Value="HH:mm:ss"/>
            <Setter Property="AutoRange" Value="Never"/>
            <Setter Property="GrowBy" Value="0.1, 0.1"/>
            <Setter Property="AxisAlignment" Value="Bottom"/>
            <Setter Property="VisibleRangeLimitMode" Value="MinMax"/>
            <Setter Property="VisibleRange" Value="{Binding Mode=OneWay, RelativeSource={RelativeSource Mode=Self}, Path=VisibleRangeLimit}"/>
        </Style>

VisibleRangeLimit is set in code behind. So as you can see X axis can not go out of VisibleRangeLimit. So we came to my problem: with MouseWheelZoomModifier if I hold Ctrl button and scrolling, when X axis comes to limit it starts to zoom X axis.
The same happens with ZoomPanModifier, but in ZoomPanModifier it can be disabled by setting ClipModeX=”ClipAtExtents”, so when you approaches to the border and continue panning it simply do nothing – that’s what behavour I need in MouseWheelZoomModifier with Ctlr key pressed. I could not find anything like this in MouseWheelZoomModifier. Any ideas?

Version
6.2.1.13304
  • You must to post comments
0
0

Hi Grigoriy,

This is one of those things that’s really easy to solve if you have the source-code, but not so easy if you don’t.

The MouseWheelZoomModifier calls a function Axis.Scroll and passes in ClipMode.None. I’ve added a property ClipModeX to the MouseWheelZoomModifier and pushed this to Nightly build 6.2.2.13447.

If you try that build, try the new property can you let me know if it solves your problem?

Thanks and regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.