Exception at RadChart when adding new item

2 posts, 0 answers
  1. Leticia
    Leticia avatar
    5 posts
    Member since:
    Oct 2015

    Posted 25 Apr Link to this post

    Hi Team!

    I'm having the following exception throwed sometimes (I can't reproduce it consistently).

    Is this a bug? 

    System.ArgumentException: An item with the same key has already been added.
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Telerik.Windows.Controls.Charting.ResourceHelper.GetThemeLocationAttribute(Theme theme)
       at Telerik.Windows.Controls.Charting.ResourceHelper.RetrieveAnimationStoryboard(IAnimatable animatableItem)
       at Telerik.Windows.Controls.Charting.SelfDrawingSeries.ManageAnimationSettings()
       at Telerik.Windows.Controls.Charting.SelfDrawingSeries.OnApplyTemplate()
       at System.Windows.FrameworkElement.ApplyTemplate()
       at Telerik.Windows.Controls.ItemsControlExtensions.GetItemsPanelRecursive[TPanel](DependencyObject control)
       at Telerik.Windows.Controls.Charting.ItemsControlExtensions.InvalidateItemsPanelMeasureRecursive(ItemsControl control)
       at Telerik.Windows.Controls.Charting.ChartArea.InvalidateSeriesMeasure()
       at Telerik.Windows.Controls.Charting.Axis.UpdateRangeAndStep()
       at Telerik.Windows.Controls.Charting.Axis.BuildAxisData()
       at Telerik.Windows.Controls.Charting.AxisX.BuildAxisData()
       at Telerik.Windows.Controls.Charting.Axis.UpdateAxis()
       at Telerik.Windows.Controls.Charting.Axis.ChartAreaDataChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Telerik.Windows.Controls.Charting.ChartArea.OnDataChanged()
       at Telerik.Windows.Controls.Charting.ChartArea.UpdateChart()
       at Telerik.Windows.Controls.Charting.ChartArea.OnDataSeriesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.RaiseCollectionChangedOnResume()
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Telerik.Windows.Data.RadObservableCollection`1.AddRange(IEnumerable`1 items)
       at Telerik.Windows.Controls.Charting.RadHierarchicalObservableCollection`1.AddRange(IEnumerable`1 items)
       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.NotifyCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at MTB.View.OptionWatchContent.InsertRow(MTuple row)
       at MTB.View.OptionWatchContent.<ResetPlot>b__16()
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

     

    Thanks a lot!

    Best regards,

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 27 Apr Link to this post

    Hello Leticia,

    We cannot confirm whether or not this is a bug unless we have a project that demonstrates this. We cannot get all the information we need just from a stack trace. If you need further assistance with this, I will ask that you provide us with a small working project that reproduces the error, so that we can take a look.

    As I mentioned in another ticket of yours earlier today, we suggest you do not use the old RadChart for new development, but use the new RadChartView.

    Regards,
    Petar Marchev
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top