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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exception when using ChartTrackBallBehavior and bound series collection

Thread ID:

Created:

Updated:

Platform:

Replies:

150484 Jan 8,2020 03:25 PM UTC Jan 13,2020 09:31 AM UTC WPF 4
loading
Tags: SfChart
Ondrej Svoboda
Asked On January 8, 2020 03:25 PM UTC

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)

Saravanan Madheswaran [Syncfusion]
Replied On 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. 


Ondrej Svoboda
Replied On January 10, 2020 01:59 PM UTC

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

Ondrej Svoboda
Replied On January 12, 2020 10:27 AM UTC

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

Hemalatha Marikumar [Syncfusion]
Replied On 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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon