Index was outside the bounds of the array
Posted: Fri Feb 11, 2011 12:26 am
Hi,
I’m using TeeChart Pro v2009/2010 for Visual Studio .NET in data acquisition.
License Number : XXXXXXXX
I have quite reproducible “Index was outside the bounds of the array” exception in TeeChart:
Here is the scenario:
1. There are several FastLine Series and Points series in the TeeChart control.
2. In run time, various threads are asynchronously adding points (5 points per second per series) to the series using invocation:
if (chart.InvokeRequired)
chart.Invoke(. . .);
3. X-axis is rescaled in runtime: as soon as any data point reaches the right margin of the graph, x-max is increased
Axes.Bottom.Maximum = Axes.Bottom.Maximum * 2;
so there is always a gap between the last data point in the series and the right margin of the graph.
4. Zoom in on the gap and there is an exception in the Points series.
Could you recommend a solution for the problem?
Thank you
Vladimir
I’m using TeeChart Pro v2009/2010 for Visual Studio .NET in data acquisition.
License Number : XXXXXXXX
I have quite reproducible “Index was outside the bounds of the array” exception in TeeChart:
Here is the scenario:
1. There are several FastLine Series and Points series in the TeeChart control.
2. In run time, various threads are asynchronously adding points (5 points per second per series) to the series using invocation:
if (chart.InvokeRequired)
chart.Invoke(. . .);
3. X-axis is rescaled in runtime: as soon as any data point reaches the right margin of the graph, x-max is increased
Axes.Bottom.Maximum = Axes.Bottom.Maximum * 2;
so there is always a gap between the last data point in the series and the right margin of the graph.
4. Zoom in on the gap and there is an exception in the Points series.
Could you recommend a solution for the problem?
Thank you
Vladimir