I'm getting an unhandled exception from the xamDataChart, it's pretty random but it seems to happen most often when I switch the data series that the chart is to display. Basically when the operator requests to see a different set of values, I clear the chart series and recreate a new set of series to display. This is the info I am getting from the exception. Looking at the inner exception it looks like the chart is trying to set the height of something to infinity?
---------------------------------------Exception Details Message Exception has been thrown by the target of an invocation. Types System.Reflection.TargetInvocationException Call Stack at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) Target mscorlibTarget InvokeMethod------------------------------------------------------------------------------ Message 'Infinity' is not a valid value for property 'Height'. Types System.ArgumentException Call Stack at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at Infragistics.Controls.Charts.ColumnSeries.RenderFrame(CategoryFrame frame, CategorySeriesView view) at Infragistics.Controls.Charts.CategorySeries.RenderSeriesOverride(Boolean animate) at Infragistics.Controls.Charts.Series.DoRenderSeries(Boolean animate) at Infragistics.Controls.Charts.ContentInfo.DoRefresh() at Infragistics.Controls.Charts.ChartContentManager.DoRefresh() Target WindowsBaseTarget SetValueCommon------------------------------------------------------------------------------
Hello David,
For switching to different series and different data values I have attached a sample.
Switching series is not really the problem, I do it basically the same way that you show in the sample.
Its the unhandled exception that is causing trouble. Any suggestion on how I can troubleshoot this exception? It's only happening 1 out of 100 times if I'm lucky