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
270
Red X Exception using UltraChart scroll bar on X-Axis
posted

I'm getting the following error using the scrollbar on the X-Axis of an UltraChart:

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

    at System.Collections.ArrayList.get_Item(Int32 index)
   at Infragistics.UltraChart.Resources.ChartCollectionBase.GetItem(Int32 index)
   at Infragistics.UltraChart.Resources.Appearance.AxisLabelInfoCollection.get_Item(Int32 index)
   at Infragistics.UltraChart.Resources.Appearance.DefaultPreAxisLabelLayoutBehavior.Apply(Rectangle bounds, IAdvanceAxis axis, AxisAppearance axisApp, AxisLabelInfoCollection labels, Rectangle& boundsUsed)
   at Infragistics.UltraChart.Core.Layers.Axis.ApplyLayoutBehaviors(AxisLabelInfoCollection labels, AxisLabelLayoutBehaviorCollection effectsToUse, Rectangle& bounds, AxisAppearance axisApp)
   at Infragistics.UltraChart.Core.Layers.Axis.ApplyLayoutBehaviors(Rectangle bounds, AxisAppearance axisApp, AxisLabelInfoCollection itemLabels, AxisLabelInfoCollection seriesLabels)
   at Infragistics.UltraChart.Core.Layers.SetLabelAxis.FillSceneGraphStacked(SceneGraph scene)
   at Infragistics.UltraChart.Core.Layers.SetLabelAxis.FillSceneGraph(SceneGraph scene)
   at Infragistics.UltraChart.Core.Layers.TwoDGridLayer.FillSceneGraph(SceneGraph scene, Boolean includeXAxes, Boolean includeYAxes)
   at Infragistics.UltraChart.Core.Layers.TwoDGridLayer.FillSceneGraph(SceneGraph scene)
   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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

This is version 8.2.20082.1000 of the WinForms control.  Using VS 2005 and .NET 2.0 for development.

This occurrs when I 'zoom' using the + sign; causing the scale to spread.  Holding the + continuously results in the exception occurring as the scale expands.  I can also get the same exception by expanding the scale to the point that a single data point is visible and then scrolingl the scrollbar left and right quickly.

This is not a problem in the 6.3.20063.53 version which we are currently using in an older branch of our application.  In both branches the code supporting the chart is essentially the same, the only significant difference is the chart control.