IndexOutOfRange Error when moving a chart to the left side.
IndexOutOfRange Error when moving a chart to the left side.
when I fill a chart like this:
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Series s = new
Steema.TeeChart.Styles.Points(tChart1.Chart);
for (int j = 0; j < 5; j++)
{
s.Add(j+i*10, j);
}
}
and then drag the chart contents to the left (right mouse button) an
IndexOutOfRange error occurs with the following message. It has something to do with the first points getting out of the visible range.
What am I doing wrong?
Error trace:
"" at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)\r\n at Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()\r\n at Steema.TeeChart.Styles.Series.DrawSeries()\r\n at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)\r\n at Steema.TeeChart.Chart.InternalDraw(Graphics g)\r\n at "
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Series s = new
Steema.TeeChart.Styles.Points(tChart1.Chart);
for (int j = 0; j < 5; j++)
{
s.Add(j+i*10, j);
}
}
and then drag the chart contents to the left (right mouse button) an
IndexOutOfRange error occurs with the following message. It has something to do with the first points getting out of the visible range.
What am I doing wrong?
Error trace:
"" at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)\r\n at Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()\r\n at Steema.TeeChart.Styles.Series.DrawSeries()\r\n at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)\r\n at Steema.TeeChart.Chart.InternalDraw(Graphics g)\r\n at "
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi FatDonkey,
I'm not able to reproduce this one using latest TeeChart for .NET v3 release available at the client area. Some similar issues have been fixed in last releases. Which version are you using? Can you please check if that solves the problem at your end?
Thanks in advance.
I'm not able to reproduce this one using latest TeeChart for .NET v3 release available at the client area. Some similar issues have been fixed in last releases. Which version are you using? Can you please check if that solves the problem at your end?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
IndexOutOfRange Error when moving a chart to the left side.
Hello,
I am using the latest release. I got the errors in a more complex project. To reproduce them I created an empty project/form, placed a Chart and controller on it and added the filling procedure (see first post).
I use VS2005 on win XP, SP3. I installed the latest updates for VS and .net.
I think it has something to do with the range of visible points. As soon as the left-bottom points are disappearing (when panning to the left) the exception is thrown.
Panning up, down or to the right works ok.
Zooming in on an area that would place the left-bottom point outside the visible range also throws an exception!
If it helps I can send you my project and executable.
I am using the latest release. I got the errors in a more complex project. To reproduce them I created an empty project/form, placed a Chart and controller on it and added the filling procedure (see first post).
I use VS2005 on win XP, SP3. I installed the latest updates for VS and .net.
I think it has something to do with the range of visible points. As soon as the left-bottom points are disappearing (when panning to the left) the exception is thrown.
Panning up, down or to the right works ok.
Zooming in on an area that would place the left-bottom point outside the visible range also throws an exception!
If it helps I can send you my project and executable.
IndexOutOfRange Error when moving a chart to the left side.
This is the Exception text (this time on a clean Windows XP embedded, SP2). The exception occurs during FirstLastVisible index calculation.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()
at Steema.TeeChart.Styles.Series.DrawSeries()
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ChartTest
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/ChartTest/ChartTest.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
TeeChart
Assembly Version: 3.5.3330.21113
Win32 Version: 3.5.3330.21113
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/ChartTest/TeeChart.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()
at Steema.TeeChart.Styles.Series.DrawSeries()
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ChartTest
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/ChartTest/ChartTest.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
TeeChart
Assembly Version: 3.5.3330.21113
Win32 Version: 3.5.3330.21113
CodeBase: file:///C:/Documents%20and%20Settings/Administrator/My%20Documents/ChartTest/TeeChart.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi FatDonkey,
I'm not able to reproduce the problem here using code below. Could you please complete axes SetMinMax calls commented below so that we can reproduce the problem here?
Thanks in advance.
I'm not able to reproduce the problem here using code below. Could you please complete axes SetMinMax calls commented below so that we can reproduce the problem here?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Series s = new Steema.TeeChart.Styles.Points(tChart1.Chart);
for (int j = 0; j < 5; j++)
{
s.Add(j + i * 10, j);
}
}
//tChart1.Axes.Left.SetMinMax(,);
//tChart1.Axes.Bottom.SetMinMax(,);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
IndexOutOfRange Error when moving a chart to the left side.
I placed your code in my project and filled in min and max values:
private void InitializeChart()
{
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Series s = new Steema.TeeChart.Styles.Points(tChart1.Chart);
for (int j = 0; j < 5; j++)
{
s.Add(j + i * 10, j);
}
}
tChart1.Axes.Left.SetMinMax(0,10);
tChart1.Axes.Bottom.SetMinMax(0,100);
}
The effect is the same. When panning to left an exception is thrown when the last point of the first series crosses the left axis.
private void InitializeChart()
{
for (int i = 0; i < 5; i++)
{
Steema.TeeChart.Styles.Series s = new Steema.TeeChart.Styles.Points(tChart1.Chart);
for (int j = 0; j < 5; j++)
{
s.Add(j + i * 10, j);
}
}
tChart1.Axes.Left.SetMinMax(0,10);
tChart1.Axes.Bottom.SetMinMax(0,100);
}
The effect is the same. When panning to left an exception is thrown when the last point of the first series crosses the left axis.
IndexOutOfRange Error when moving a chart to the left side.
Altering the code generates an immediate exception:
Code: Select all
tChart1.Draw();
tChart1.Axes.Left.SetMinMax(0,10);
tChart1.Axes.Bottom.SetMinMax(30,100);
IndexOutOfRange Error when moving a chart to the left side.
I've installed an old version: 3.5.3274.30663
Now it works!
Something is not right in your latest version.
Now it works!
Something is not right in your latest version.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi FatDonkey,
Thanks for your feedback. I could reproduce the issue here now using last maintenance release but checked it works fine using our current sources. So you can expect this being fixed for the next maintenance release which will be out before the end of the week.
Thanks for your feedback. I could reproduce the issue here now using last maintenance release but checked it works fine using our current sources. So you can expect this being fixed for the next maintenance release which will be out before the end of the week.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: IndexOutOfRange Error when moving a chart to the left side.
Hi,
I found this post that discrib exctly the issue that I have encontred with the version 3.5.3330.21114 using VS 2010
Source=TeeChart
StackTrace:
à Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
à Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()
à Steema.TeeChart.Styles.Series.DrawSeries()
à Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
à Steema.TeeChart.Chart.InternalDraw(Graphics g)
à Steema.TeeChart.TChart.Draw(Graphics g)
à Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
à System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
à System.Windows.Forms.Control.WmPaint(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
à SpiRID_Companion.Program.Main() dans D:\Dev\SpiRID companion\SpiRID Companion\Program.cs:ligne 18
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:
Is there a fix?
Thanks
I found this post that discrib exctly the issue that I have encontred with the version 3.5.3330.21114 using VS 2010
Source=TeeChart
StackTrace:
à Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
à Steema.TeeChart.Styles.CustomPoint.CalcFirstLastVisibleIndex()
à Steema.TeeChart.Styles.Series.DrawSeries()
à Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
à Steema.TeeChart.Chart.InternalDraw(Graphics g)
à Steema.TeeChart.TChart.Draw(Graphics g)
à Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
à System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
à System.Windows.Forms.Control.WmPaint(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
à SpiRID_Companion.Program.Main() dans D:\Dev\SpiRID companion\SpiRID Companion\Program.cs:ligne 18
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:
Is there a fix?
Thanks
Re: IndexOutOfRange Error when moving a chart to the left side.
Hello hchiker,
I have seen that your version of TeeChart.Net 3 is not the last. Could you please, update your version of TeeChart and try again if your problem persist?
Thanks,
I have seen that your version of TeeChart.Net 3 is not the last. Could you please, update your version of TeeChart and try again if your problem persist?
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: IndexOutOfRange Error when moving a chart to the left side.
Hi,
it seems that the version 3.5.3700.30575 correct this issue. I'll continue my tests and keeps you informed.
Thanks
it seems that the version 3.5.3700.30575 correct this issue. I'll continue my tests and keeps you informed.
Thanks