ArgumentOutOfRangeException when updating palette for pie chart

3 posts, 0 answers
  1. Stephen
    Stephen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 27 Sep 2013 Link to this post

    Hi, when the data is updated for a chart's ItemsSource, the palette is also updated (the property is linked to a converter). However, there is a problem when trying to apply this palette to the pie series. See below for the exception.

    Parameter name: index
          at System.ThrowHelper.ThrowArgumentOutOfRangeException()
          at System.Collections.Generic.List`1.get_Item(Int32 index)
          at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
          at Telerik.Windows.Controls.ChartView.ChartPalette.GetEntry(String family, Int32 index)
          at Telerik.Windows.Controls.ChartView.PieSeries.ApplyPaletteCore()
          at Telerik.Windows.Controls.ChartView.PresenterBase.ApplyPalette()
          at Telerik.Windows.Controls.ChartView.PresenterBase.UpdatePalette(Boolean force)
          at Telerik.Windows.Controls.ChartView.RadChartBase.ProcessPaletteChanged(Boolean force)
          at Telerik.Windows.Controls.ChartView.RadChartBase.OnPaletteChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
          at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(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.RefreshExpression(DependencyProperty dp)
          at System.Windows.Data.BindingExpression.SendDataToTarget()
          at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
          at System.Windows.PropertyPathListener.ReconnectPath()
          at System.Windows.Data.Debugging.BindingBreakPoint.<>c__DisplayClass4.<BreakOnSharedType>b__3()

    Linear charts work fine, this is only a problem with pie charts. Pie charts load as expected - it's only when the palette is updated that this error is thrown.
  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 02 Oct 2013 Link to this post

    Hi Stephen,

    Given the provided information, I was not able to reproduce the exception that your are reporting. I have attached my test project for reference. In order to help you we will need to observe the problem on our side. It would be best if you could provide a runable project (perhaps a modified version of mine). Describing in more detail exactly how you are using RadPieChart could also be helpful.

    Thanks for the understanding.
    Petar Kirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. Stephen
    Stephen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 15 Oct 2013 Link to this post

    Thank you for your response. I fixed it by changing the pie series' ItemsSource, as it was set to a different collection than what the palette selector was listening to.
Back to Top