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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

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

  • You must to post comments
0
0

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

  • pray
    Yuriy,That solved my problem. Thanks.Pat
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.