This is a migrated thread and some comments may be shown as answers.

Problem with ScatterLineSeries and ChartPanAndZoomBehavior

3 Answers 83 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Carsten
Top achievements
Rank 1
Carsten asked on 04 Feb 2014, 09:32 AM
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>

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 04 Feb 2014, 04:53 PM
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 >>
0
Carsten
Top achievements
Rank 1
answered on 10 Feb 2014, 03:45 PM
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))
0
Petar Marchev
Telerik team
answered on 13 Feb 2014, 08:58 AM
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).

Tags
ChartView
Asked by
Carsten
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Carsten
Top achievements
Rank 1
Share this question
or