This is a migrated thread and some comments may be shown as answers.

ArgumentOutOfRangeException when updating palette for pie chart

2 Answers 42 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 27 Sep 2013, 05:33 PM
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 Answers, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 02 Oct 2013, 05:32 PM
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.
  
Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
0
Stephen
Top achievements
Rank 1
answered on 15 Oct 2013, 04:24 PM
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.
Tags
Chart
Asked by
Stephen
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or