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>
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>