"Index was outside the bounds of the array"
Posted: Thu Jan 15, 2004 1:05 pm
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
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