Page 1 of 1

"Index was outside the bounds of the array"

Posted: Thu Jan 15, 2004 1:05 pm
by 8120359
Hi,

I try to add new points to the ColorGrid after I refreshed it, but it generating error: Index was outside the bounds of the array.

Where's the problem? I don't wanna add whole array everytime when I need to add only one "row"

...
Random rnd=new Random();

for(int i=0;i<10;i++)
{
for(int j=0;j<20;j++)
{
colorGrid1.Add(j,rnd.NextDouble()+3,i,Color.Blue);
}
}

tChart1.Refresh();

Double maxRow=tChart1.Axes.Left.Maximum;

for(int j=0;j<20;j++)
{
colorGrid1.Add(j,3,maxRow+1,Color.Blue);
colorGrid1.Repaint();
}

....


TeeChart version 1.0.1189

Posted: Thu Jan 15, 2004 7:27 pm
by 8121246
Hi HQO,

I've got a similar problem/error be it in a slightly different situation, see 'installation of .new maintenance version' in this forum for details. My first guess is that it may be a binning problem within TChart? It is not a new problem, I also encountered it with the previous .Net version.
Cheers
FrancisP

Posted: Fri Jan 16, 2004 1:29 pm
by Pep
>Where's the problem? I don't wanna add whole array everytime when I >need to add only one "row"

It works fine using the latest maintenance release of TeeChart for .Net v1 (Build 1.1.1452.42972) available for download on our web site at the "private customers download page". Could you please download it and test if it works fine for you ?