Problem with ScatterLineSeries and ChartPanAndZoomBehavior

4 posts, 0 answers
  1. Carsten
    Carsten avatar
    2 posts
    Member since:
    Feb 2014

    Posted 04 Feb 2014 Link to this post

    Hi,

    i have a chart based on a list of some X,Y-Values displayed by the ScatterLineSeries. Everything works fine so far. 

    Now I need to be able to zoom in to the chart, but after adding the ChartPanAndZoomBehavior the line “jumps” between the points during zooming or moving.  
    See attached image for an example. On the first image the line is correct, on the secon image after moving the chart or continuing zooming the point 3 is no longer part of the line.

    How can I assure, that the line does not change during zooming in?


    Thanks,
    Carsten



    Some parts of the XAML
              <telerik:RadCartesianChart.Resources>
     <DataTemplate x:Key="DataPoint">
                  <Ellipse Width="8"
                         Height="8"
                         Fill="DarkGray"
                         ToolTip="{Binding DataItem.ToolTipText}"/>
                </DataTemplate>
                <Style TargetType="telerik:PanZoomBar">
                  <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
              </telerik:RadCartesianChart.Resources>
      
              <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartSelectionBehavior 
                DataPointSelectionMode="Single" 
                HitTestMargin="4"/>

                <telerik:ChartPanAndZoomBehavior
                MouseWheelMode="Zoom"
                DragMode="Pan"
                ZoomMode="Both"/>
                
              </telerik:RadCartesianChart.Behaviors>

              <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
              </telerik:RadCartesianChart.Grid>

              <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis LabelFitMode="MultiLine" Minimum="0">
                  <telerik:LinearAxis.LabelTemplate>
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding}"/>
                        <TextBlock Text="..."/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:LinearAxis.LabelTemplate>
                </telerik:LinearAxis>
              </telerik:RadCartesianChart.HorizontalAxis>

              <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis Minimum="0" >
                  <telerik:LinearAxis.LabelTemplate >
                    <DataTemplate>
                      <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding}"/>
                        <TextBlock Text="..."/>
                      </StackPanel>
                    </DataTemplate>
                  </telerik:LinearAxis.LabelTemplate>
                </telerik:LinearAxis>

              </telerik:RadCartesianChart.VerticalAxis>

              <telerik:ScatterLineSeries
              PointTemplate="{StaticResource DataPoint}"
              ItemsSource="{Binding myCurveName.CurvePoints}"
              XValueBinding="myXValuePropertyName" 
              YValueBinding="myYValuePropertyName" >
             </telerik:ScatterLineSeries>
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 04 Feb 2014 Link to this post

    Hi Carsten,

    This resembles an old bug we had a while ago. Can you please download the latest version and give it another try?

    Regards,
    Petar Marchev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Carsten
    Carsten avatar
    2 posts
    Member since:
    Feb 2014

    Posted 10 Feb 2014 in reply to Petar Marchev Link to this post

    Hi,

    after updating to the current version the behavior of the chart is still the same – the line jumps between the points, while zooming in.

    It seems this bug comes in place, if a point in the chart has a smaller value on the horinzontal axis than the point before. Sadly sorting is not in option, because this would result a wrong chart too..

        points.Add(New MyDataPoint(0, 220))
        points.Add(New MyDataPoint(600, 325))
        points.Add(New MyDataPoint(700, 320))
        points.Add(New MyDataPoint(800, 120))
        points.Add(New MyDataPoint(500, 0))
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 13 Feb 2014 Link to this post

    Hi Carsten,

    Thank you for the follow up. I created a new project based on your description and I did reproduce the faulty behavior. I have logged this as a bug in our feedback portal. I have also updated your Telerik points as a thank you for bringing this issue to us.

    Currently I cannot suggest a work-around for this, other than not using a zoom behavior. The issue will most likely be fixed for the Q1 service pack, and I hope that you will be able to wait for the fix until then.

    Regards,
    Petar Marchev
    Telerik

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Back to Top