Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
IndexOutOfRangeException when using NullHandling.InterpolateSimple and a databound NumericTimeSeries
posted

Hi,

I'm running into a problem using a data bound NumericTimeSeries and using NullHandling.InterpolateSimple.  The data in the DataTable being used contains all nulls, and this appears to cause a problem.

Is there a property or setting that I'm missing that prevents this exception from getting thrown?

I realize that I could do some work ahead of time to detect if the chart's values are all null, and not create the chart layer or something like that, but the chart is part of a dynamic data source which allows the changing of the underlying chart data on the fly.  If the user set some values to null after the initial detection, I would have to recreate the entire chart to do the null checking all over again.

Please advise on the best way to proceed.

FYI, I'm using version 8.1.20081.1000 of Infragistics2.Win.UltraWinChart.v8.1.

Exception Text Below: 

---------------------------

---------------------------
System.IndexOutOfRangeException: Index was outside the bounds of the array.

   at System.Array.InternalGetReference(Void* elemRef, Int32 rank, Int32* pIndices)

   at System.Array.GetValue(Int32 index1, Int32 index2)

   at Infragistics.UltraChart.Core.Layers.ChartLayer.InterpolateSimple(InterpolateValuesEventArgs e)

   at Infragistics.UltraChart.Core.Layers.ChartLayer.InterpolateNumericTimeValues(PrimitiveCollection primitives, Type type, ChartLayer layer)

   at Infragistics.UltraChart.Core.Layers.LineLayer.InterpolateValues(PrimitiveCollection primitives, Type type, Int32 arrayWidth)

   at Infragistics.UltraChart.Core.Layers.ChartLayer.InterpolatePrimitives(PrimitiveCollection primitives, Type type, Int32 arrayWidth)

   at Infragistics.UltraChart.Core.Layers.LineLayer.FillSceneGraph(SceneGraph scene)

   at Infragistics.UltraChart.Resources.Appearance.ChartArea.FillSceneGraph(SceneGraph scene, IChartComponent chartComponent, ChartCore core)

   at Infragistics.UltraChart.Core.ChartCore.DrawComposite()

   at Infragistics.UltraChart.Core.ChartCore.DrawChart()

   at Infragistics.Win.UltraWinChart.UltraChart.OnPaint(PaintEventArgs e)

   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

   at System.Windows.Forms.Control.WmPaint(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ContainerControl.WndProc(Message& m)

   at System.Windows.Forms.UserControl.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.Run(Form mainForm)