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?
- You must login to post comments
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
- Andrew Burnett-Thompson answered 3 years ago
-
Hi, Andrew. Where can I get this nightly build from?
-
Hi Grigoriy, sorry I didn’t see this! If you haven’t figured it out yet, nightly builds can be fetched following these steps https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget
-
Hi, Andrew. ClipModeX did the trick for ActionType = Pan. But for ActionType = Zoom I still can zoom out of data and view blank area when data occupies area less than axis VisibleRangeLimit set. So if I zoom out using MouseWheelZoomModifier (ActionType = ActionType .Zoom) and afterwards change ActionType to Pan or use ZoomPanModifier (with ClipModeX = ClipMode.ClipAtExtents) chart blinks and clips to data. I think the root of my problem is improper (in my opinion) behavior of MouseWheelZoomModifier and ZoomPanModifier when ClipModeX = None. In my opinion they should not perform zoom when axis VisibleRangeLimit is reached. Instead they should just do nothing.
- You must login to post comments
Please login first to submit.