This question is locked. New answers and comments are not allowed.
In the following chart...
... in the ItemToolTipOpening event, the e.DataPoint.DataItem is always null.
Any ideas why?
<telerik:RadChart telerik:StyleManager.Theme="Expression_Dark" HorizontalAlignment="Left" Name="ChartJam" VerticalAlignment="Stretch" PaletteBrushesUseSolidColors="True" Loaded="ChartJam_Loaded" Height="Auto" MinHeight="100" Width="Auto" MinWidth="200" Margin="0" BorderThickness="0" Cursor="Hand"> <telerik:RadChart.DefaultView> <telerik:ChartDefaultView> <telerik:ChartDefaultView.ChartArea> <telerik:ChartArea EnableAnimations="False" x:Name="MyChartArea" ItemToolTipOpening="ChartArea_ItemToolTipOpening"> <telerik:ChartArea.AxisY > <telerik:AxisY Title="" AutoRange="True" StripLinesVisibility="Visible" MajorGridLinesVisibility="Visible"> </telerik:AxisY> </telerik:ChartArea.AxisY> <telerik:ChartArea.Annotations> </telerik:ChartArea.Annotations> <telerik:ChartArea.AxisX> <telerik:AxisX IsDateTime="True" MajorGridLinesVisibility="Visible" MinorGridLinesVisibility="Visible" Title="" LabelRotationAngle="45" DefaultLabelFormat="HH:mm" AutoRange="True" LabelStep="1" TicksDistance="20"> </telerik:AxisX> </telerik:ChartArea.AxisX> </telerik:ChartArea> </telerik:ChartDefaultView.ChartArea> </telerik:ChartDefaultView> </telerik:RadChart.DefaultView> </telerik:RadChart>ChartJam.DefaultView.ChartArea.AxisX.AxisStyles.ItemLabelStyle = App.Current.Resources["ChartLabel"] as Style; ChartJam.DefaultView.ChartArea.AxisY.AxisStyles.ItemLabelStyle = App.Current.Resources["ChartLabel"] as Style; ChartJam.DefaultView.ChartArea.Annotations.Clear(); ChartJam.DefaultView.ChartArea.EnableAnimations = false; ChartJam.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed; ChartJam.DefaultSeriesDefinition = new AreaSeriesDefinition() { Appearance = new SeriesAppearanceSettings() { Stroke = Utilities.StringToSolidColorBrush("93D427"), StrokeThickness = 1.0, Fill = new SolidColorBrush(Colors.Black) }, ShowPointMarks = false, ShowItemLabels = false, ShowItemToolTips = true }; SeriesMapping seriesMapping = new SeriesMapping(); seriesMapping.ItemMappings.Add(new ItemMapping("JamLength", DataPointMember.YValue)); seriesMapping.ItemMappings.Add(new ItemMapping("DtJamLength", DataPointMember.XValue)); ChartJam.SeriesMappings.Add(seriesMapping); ChartJam.ItemsSource = _chartsJamGuardVM.LineData; _chartsJamGuardVM.DownloadChartJam();... in the ItemToolTipOpening event, the e.DataPoint.DataItem is always null.
private void ChartArea_ItemToolTipOpening(ItemToolTip2D tooltip, ItemToolTipEventArgs e) { if (e.DataPoint.DataItem == null) { tooltip.Content = null; return; }...Any ideas why?