SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
I cannot get panning to work on the x axis which is a DateTimeAxis. I am databinding the visible range to a property on my view model and the zooming works ok. Also panning on the Y-axis works.
Here is my XAML:
<s:SciChartSurface x:Name="_sciChartSurface" Grid.Row="1" Grid.ColumnSpan="2" RenderableSeries="{s:SeriesBinding PlotViewModels}">
<s:SciChartSurface.XAxis>
<s:DateTimeAxis AxisTitle="{Binding HorizontalTitle}" VisibleRange="{Binding HorizontalRange, Mode=TwoWay}" AutoRange="Never"
IsStaticAxis="True" DrawMajorBands="False" TextFormatting="dd-MMM-yyyy" SubDayTextFormatting="H:mm:ss:tt"
AutoTicks="True"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="{Binding VerticalTitle}" AxisAlignment="Left" VisibleRange="{Binding VerticalRange}"
AutoRange="{Binding AutoRange}" DrawMajorBands="False"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:RubberBandXyZoomModifier IsXAxisOnly="False"
ZoomExtentsY="True"
IsAnimated="True"
RubberBandFill="#55FFFFFF" RubberBandStroke="#FFFFFFFF" RubberBandStrokeDashArray="2 2">
</s:RubberBandXyZoomModifier>
<s:ZoomPanModifier ExecuteOn="MouseRightButton" ClipModeX="None" XyDirection="XYDirection" IsEnabled="True" />
<!-- Allow Dragging YAxis to Scale -->
<s:YAxisDragModifier DragMode="Scale"/>
<!-- Allow Dragging XAxis to Pan -->
<s:XAxisDragModifier DragMode="Scale" IsEnabled="True"/>
<s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection"/>
<s:ZoomExtentsModifier IsAnimated="True" ExecuteOn="MouseDoubleClick"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
Hi Patrick,
Your code looks correct, and there are no bugs reported with panning on the DateTimeAxis.
You know that you have set ExecuteOn to MouseRightButton for the ZoomPanModifier? You are trying to pan with right-mouse button yes?
Best regards,
Andrew
Please login first to submit.