This question is locked. New answers and comments are not allowed.
Hi All,
I am trying to bind more than 4 series to the rad chart. Four series are binding perfectly, but when I am trying to bind 5th series, I am getting the below error,:
Unable to cast object of type 'System.Decimal' to type Object
at Telerik.Windows.Data.FuncExtensions.<>c__DisplayClass1`2.<ToUntypedFunc>b__0(Object item)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ExtractDataPoint(QueryableCollectionViewGroup queryableCollectionViewGroup, AggregateFunction aggregateFunction, Func`2 getter, EmptyPointBehavior emptyPointBehavior)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoMappings(QueryableCollectionView dataEngine, List`1 numericPropertyDescriptors, ISeriesDefinition defaultSeriesDefinition, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings)
at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind()
at Telerik.Windows.Controls.RadChart.SeriesMappingsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.DependencyObjectCollection`1.TryCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.DependencyObjectCollection`1.RaiseReset()
at System.Windows.DependencyObjectCollection`1.Clear()
at SODANORTEL.MainPage.LoadGraphDown(Object s, EventArgs e)
at SODANORTEL.MainPage.lst_Measures_Downward_SelectionChanged(Object sender, SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.OnSelectionChanged(SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
at System.Windows.Controls.Primitives.Selector.NotifyListItemSelected(ListBoxItem listBoxItem, Boolean isSelected)
at System.Windows.Controls.Primitives.Selector.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
at System.Windows.Controls.ListBox.MakeToggleSelection(Int32 index)
at System.Windows.Controls.ListBox.HandleItemSelection(ListBoxItem item, Boolean isMouseSelection)
at System.Windows.Controls.ListBox.OnListBoxItemClicked(ListBoxItem item)
at System.Windows.Controls.ListBoxItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Any idea why I am not able to bind more than 4 series to a line chart.
Thanks in Advance
I am trying to bind more than 4 series to the rad chart. Four series are binding perfectly, but when I am trying to bind 5th series, I am getting the below error,:
Unable to cast object of type 'System.Decimal' to type Object
at Telerik.Windows.Data.FuncExtensions.<>c__DisplayClass1`2.<ToUntypedFunc>b__0(Object item)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ExtractDataPoint(QueryableCollectionViewGroup queryableCollectionViewGroup, AggregateFunction aggregateFunction, Func`2 getter, EmptyPointBehavior emptyPointBehavior)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoMappings(QueryableCollectionView dataEngine, List`1 numericPropertyDescriptors, ISeriesDefinition defaultSeriesDefinition, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings)
at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind()
at Telerik.Windows.Controls.RadChart.SeriesMappingsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.DependencyObjectCollection`1.TryCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Windows.DependencyObjectCollection`1.RaiseReset()
at System.Windows.DependencyObjectCollection`1.Clear()
at SODANORTEL.MainPage.LoadGraphDown(Object s, EventArgs e)
at SODANORTEL.MainPage.lst_Measures_Downward_SelectionChanged(Object sender, SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.OnSelectionChanged(SelectionChangedEventArgs e)
at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
at System.Windows.Controls.Primitives.Selector.NotifyListItemSelected(ListBoxItem listBoxItem, Boolean isSelected)
at System.Windows.Controls.Primitives.Selector.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
at System.Windows.Controls.ListBox.MakeToggleSelection(Int32 index)
at System.Windows.Controls.ListBox.HandleItemSelection(ListBoxItem item, Boolean isMouseSelection)
at System.Windows.Controls.ListBox.OnListBoxItemClicked(ListBoxItem item)
at System.Windows.Controls.ListBoxItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Any idea why I am not able to bind more than 4 series to a line chart.
Thanks in Advance