SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Hi,
I’m trying to set the visible ranges of the X and YAxis with MVVM.
My xaml code looks like this:
<!-- Define the SciChartSurface -->
<SciChart:SciChartSurface Margin="5" x:Name="sciChartSurface"
SciChart:ThemeManager.Theme="ExpressionDark" DataSet="{Binding ChartData, Mode=TwoWay}" ChartTitle="Lage rug vs romp"
AutoRangeOnStartup="False">
<!-- Declare RenderableSeries -->
<SciChart:SciChartSurface.RenderableSeries>
<SciChart:XyScatterRenderableSeries ResamplingMode="None">
<SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
<ControlTemplate>
<Ellipse Width="9" Height="9" Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="2"/>
</ControlTemplate>
</SciChart:XyScatterRenderableSeries.PointMarkerTemplate>
</SciChart:XyScatterRenderableSeries>
</SciChart:SciChartSurface.RenderableSeries>
<!-- Create an X Axis -->
<SciChart:SciChartSurface.XAxis>
<SciChart:NumericAxis DrawMinorTicks="False" DrawMinorGridLines="False" TextFormatting="0" AxisTitle="Romp" VisibleRange="{Binding Path=LowerBackXAxisVisibleRange}" >
</SciChart:NumericAxis>
</SciChart:SciChartSurface.XAxis>
<!-- Create a Y Axis -->
<SciChart:SciChartSurface.YAxes>
<SciChart:NumericAxis TickTextBrush="#FF4083B7" AxisAlignment="Left" AutoRange="False" DrawMinorTicks="False" DrawMinorGridLines="False" TextFormatting="0" AxisTitle="Lage rug" VisibleRange="{Binding Path=LowerBackYAxisVisibleRange}">
</SciChart:NumericAxis>
</SciChart:SciChartSurface.YAxes>
</SciChart:SciChartSurface >
This works fine for the XAxis, but not for the YAxis.
Any idea?
Thanks,
Egbert
Hi Pat,
Could you try to specify Mode=”TwoWay” for binding explicitly and look if it helps? We couldn’t reproduce this issue on our side, but there were another similar requests and setting binding mode to TwoWay explicitly helped.
Best regards,
Yuriy
Please login first to submit.