This question is locked. New answers and comments are not allowed.
Dear Telerik,
I'm experiencing a strange behavior in ChartSelectionBehavior after update.
Can you please verify the problem?
XAML:
ChartSelectionBehavior_SelectionChanged_1 is called randomly, and ChartSelectionBehavior.SelectedPoints is populated with wrong values.
Best regards,
Darko
I'm experiencing a strange behavior in ChartSelectionBehavior after update.
Can you please verify the problem?
XAML:
<telerikChart:RadCartesianChart x:Uid="Chart" x:Name="ChartControl" Grid.Row="2" DataContext="{Binding ActivityByDate}" EmptyContentTemplate="{StaticResource EmptyChartTemplate}"> <telerikChart:RadCartesianChart.VerticalAxis> <telerikChart:CategoricalAxis></telerikChart:CategoricalAxis> </telerikChart:RadCartesianChart.VerticalAxis> <telerikChart:RadCartesianChart.HorizontalAxis> <telerikChart:LinearAxis LabelStyle="{StaticResource LabelStyle}"></telerikChart:LinearAxis> </telerikChart:RadCartesianChart.HorizontalAxis> <telerikChart:RadCartesianChart.SeriesProvider > <telerikChart:ChartSeriesProvider Source="{Binding}" x:Name="provider" > <telerikChart:ChartSeriesProvider.SeriesDescriptors > <telerikChart:CategoricalSeriesDescriptor ValuePath="Value" CategoryPath="Date" ItemsSourcePath="ValuesByDay"> <telerikChart:CategoricalSeriesDescriptor.Style> <Style TargetType="telerikChart:BarSeries"> <Setter Property="CombineMode" Value="Stack"/> <Setter Property="PointTemplate"> <Setter.Value> <DataTemplate> <Border Margin="1" BorderThickness="{Binding IsSelected, Converter={StaticResource BoolToThicknessConverter}}" BorderBrush="#FFFFE800"> <TextBlock FontSize="14" Margin="2" Foreground="White" VerticalAlignment="Center" Text="{Binding DataItem.Name}" /> </Border> </DataTemplate> </Setter.Value> </Setter> </Style> </telerikChart:CategoricalSeriesDescriptor.Style> </telerikChart:CategoricalSeriesDescriptor> </telerikChart:ChartSeriesProvider.SeriesDescriptors> </telerikChart:ChartSeriesProvider> </telerikChart:RadCartesianChart.SeriesProvider> <telerikChart:RadCartesianChart.Behaviors> <telerikChart:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="ChartSelectionBehavior_SelectionChanged_1"></telerikChart:ChartSelectionBehavior> <telerikChart:ChartPanAndZoomBehavior PanMode="Horizontal" ZoomMode="Horizontal"/> </telerikChart:RadCartesianChart.Behaviors> </telerikChart:RadCartesianChart>ChartSelectionBehavior_SelectionChanged_1 is called randomly, and ChartSelectionBehavior.SelectedPoints is populated with wrong values.
private void ChartSelectionBehavior_SelectionChanged_1(object sender, EventArgs e) //doesn't fire on some items{ ChartSelectionBehavior sel = sender as ChartSelectionBehavior; if (sel == null) return; var item = sel.SelectedPoints.FirstOrDefault(); <-- SelectedPoints returns wrong items ....}Best regards,
Darko