Exception in TeeChart v2009 when using SideAll Style
Posted: Fri Jun 04, 2010 8:20 am
Hi,
Exception occur when MultiBar of bar is set to SideAll.
The exception occurs in TChart 2009 with the following scenarios:
- the chart has 2 series and each series has only 1 bar.
- MultiBar of bar is set to SideAll.
The exception error is : System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.Series.CalcYPos(Int32 index)
at Steema.TeeChart.Styles.Bar.CalcYPos(Int32 valueIndex)
at Steema.TeeChart.Styles.Bar.CalcBarBounds(Int32 valueIndex)
at Steema.TeeChart.Styles.Bar.DrawValue(Int32 valueIndex)
at Steema.TeeChart.Styles.Series.DoDrawIndex(Int32 Index, Boolean CanID)
at Steema.TeeChart.Styles.Series.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
at Steema.TeeChart.Chart.DrawAllSeries(Graphics3D g)
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
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.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.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
at System.Windows.Forms.Control.Update()
at System.Windows.Forms.Control.Refresh()
at TestBarChart.Form1.ChangeValue()
Either we increase each series to have more than 1 bar OR set the bar’s MultiBar to Side, we will not have any issue.
We do not see this issue in the older version of Tchart.
Refer to TestBarChart_SideAll_1Bar.zip for the sample application.
Exception occur when MultiBar of bar is set to SideAll.
The exception occurs in TChart 2009 with the following scenarios:
- the chart has 2 series and each series has only 1 bar.
- MultiBar of bar is set to SideAll.
The exception error is : System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.Series.CalcYPos(Int32 index)
at Steema.TeeChart.Styles.Bar.CalcYPos(Int32 valueIndex)
at Steema.TeeChart.Styles.Bar.CalcBarBounds(Int32 valueIndex)
at Steema.TeeChart.Styles.Bar.DrawValue(Int32 valueIndex)
at Steema.TeeChart.Styles.Series.DoDrawIndex(Int32 Index, Boolean CanID)
at Steema.TeeChart.Styles.Series.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
at Steema.TeeChart.Chart.DrawAllSeries(Graphics3D g)
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
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.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.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
at System.Windows.Forms.Control.Update()
at System.Windows.Forms.Control.Refresh()
at TestBarChart.Form1.ChangeValue()
Either we increase each series to have more than 1 bar OR set the bar’s MultiBar to Side, we will not have any issue.
We do not see this issue in the older version of Tchart.
Refer to TestBarChart_SideAll_1Bar.zip for the sample application.