We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Exception when using ChartTrackBallBehavior and bound series collection

Hi,
I'm binding series collection as described in this article: https://www.syncfusion.com/kb/9406/how-to-bind-the-series-collection-property-using-mvvm-pattern and I have ChartTrackBallBehavior enabled.
When some series is changed from view model and mouse is move above chart area I receive following exception.

Can you please look on whats going on there?
I'm using the latest version available on nuget.

Thanks


Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at Syncfusion.UI.Xaml.Charts.ChartColorModel.GetBrush(Int32 colorIndex)
   at Syncfusion.UI.Xaml.Charts.ChartSeriesBase.GetInteriorColor(Int32 segmentIndex)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
   at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
   at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
   at System.Windows.FrameworkElement.RemoveLogicalChild(Object child)
   at System.Windows.Controls.UIElementCollection.RemoveInternal(UIElement element)
   at Syncfusion.UI.Xaml.Charts.ChartTrackBallBehavior.ClearItems()
   at Syncfusion.UI.Xaml.Charts.ChartTrackBallBehavior.OnPointerPositionChanged()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

4 Replies

SM Saravanan Madheswaran Syncfusion Team January 10, 2020 01:03 PM UTC

Hi Ondrej, 
 
We were unable to reproduce the reported issue at our end. But based on the provided stack trace, we have included some of the possible fixes in custom patch that are shared by us in 150483. Please check with that patch and If you faced same issue after updating with the patch also, please provide us more information or modify the below sample if possible, it will help us to assist you earlier.  
 
 
Regards, 
Saravanan. 



OS Ondrej Svoboda January 10, 2020 01:59 PM UTC

I tried the patch, but still having the same issue. I will try to modify your sample.


OS Ondrej Svoboda January 12, 2020 10:27 AM UTC

I was unable to reproduce this issue in your sample. Never mind I've found a workaround.


HM Hemalatha Marikumar Syncfusion Team January 13, 2020 09:31 AM UTC

Hi Ondrej Svoboda, 
 
Thanks for your update. 
 
We are glad to hear that the reported issue resolves. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Hemalatha M. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon