thubble Posted September 25, 2009 Report Share Posted September 25, 2009 I'm using build 3554, and I'm having a problem removing fields from the data view. If I call, for instance, chtTest.DataView.Fields.Items.RemoveAt(0) in the DataBound event of the chart after calling chtTest.DataView.Fields.ReloadFieldsFromData(), the data view stops working and I get the following error written to output: System.Windows.Data Error: 16 : Cannot get 'Data' value (type 'IEnumerable') from '' (type 'ItemsSourceHolder'). BindingExpression:Path=Data; DataItem='ItemsSourceHolder' (HashCode=10261382); target element is 'DataGridItems' (Name=''); target property is 'ItemsSource' (type 'IEnumerable') TargetInvocationException:'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at ChartFX.WPF.Internal.AttributesResolver.a(Int32 A_0) at ChartFX.WPF.DataGridItems.RenderHeaders(PaintInfo paintInfo) at ChartFX.WPF.DataGridItems.BuildItemsSource(Object obj, IEnumerator enumerator, Int32 count, Int32& rows) at ChartFX.WPF.DataView.ChartFX.WPF.Internal.ILogicalItemsBuilder.Build() at ChartFX.WPF.Internal.ItemsSourceHolder.get_Data() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at MS.Internal.Data.PropertyPathWorker.GetValue(Object item, Int32 level) at MS.Internal.Data.PropertyPathWorker.RawValue(Int32 k)' I've attached an application that reproduces this issue. To replicate, click "Reload Data", then "Hide Series", then "Reload Data" again. Thank you. Quote Link to comment Share on other sites More sharing options...
srickenb Posted September 28, 2009 Report Share Posted September 28, 2009 We have a very similar effect and get the same exception: Index was outside the bounds of the array. at ChartFX.WPF.Internal.AttributesResolver.b(Int32 A_0, Int32 A_1) at ChartFX.WPF.Axis.ChartFX.WPF.Internal.ILegendItemGenerator.BuildNext(LogicalItemCollection items, Chart chart, Int32& index, LegendItemAttributesResolved resolved, ResolvedAttributes attributes, Object target, Object& extraData) at ChartFX.WPF.LegendBox.a(ILegendItemGenerator A_0, LogicalItemCollection A_1, LegendItemAttributesResolved A_2) at ChartFX.WPF.LegendBox.a() at ChartFX.WPF.LegendBox.OnMeasure() at ChartFX.WPF.BorderContent.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at ChartFX.WPF.Controls.SpacingDockPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) See the attached application which reproduces the problem. Do the following: - Click "Add Point" - Select Tab2 - Click "Add Point" - Select Tab1 - Click "Add Point" In additon, the application shows a few more unexpected effects: - Charts are not updated, when in an unselected tab and show stale data when they reapear in the selected tab - Legends of pie charts disapear when data changes (Therefore, the collapsed/visible statements) Regards and thanks Stefan Quote Link to comment Share on other sites More sharing options...
JuanC Posted September 29, 2009 Report Share Posted September 29, 2009 This issue has been fixed on build 3558 Regards, JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.