Real time update problems
Posted: Wed Jul 01, 2009 9:29 am
Hello,
I'm having major problems using the FastLine series to display real time data. The chart keeps on freezing. Data seems to be adding to the chart OK, but every so often the display freezes. Forcing a refresh by resizing the window causes the data to display correctly, only for the same thing to happen a few minutes later.
I'm using up to 8 FastLine series. Data is being added to each series at the rate of 2 points every 2 seconds. The number of data points is from 600 - 3600 data points per series. I've read the old FAQ on real time data.
The program seems to work OK on very fast new PCs but fails on 2 or 3 years old PCs, so I presume that TChart is struggling with this number of series and data points -- although 2 points every 2 seconds seems quite slow.
I'm using TChart 3.5.3425.20244. This is a cut down version of the code I'm using. Unfortunately, I can't provide you with a sample program as this program is talking to hardware.
Have you any ideas?
Thanks
Mike
I'm having major problems using the FastLine series to display real time data. The chart keeps on freezing. Data seems to be adding to the chart OK, but every so often the display freezes. Forcing a refresh by resizing the window causes the data to display correctly, only for the same thing to happen a few minutes later.
I'm using up to 8 FastLine series. Data is being added to each series at the rate of 2 points every 2 seconds. The number of data points is from 600 - 3600 data points per series. I've read the old FAQ on real time data.
The program seems to work OK on very fast new PCs but fails on 2 or 3 years old PCs, so I presume that TChart is struggling with this number of series and data points -- although 2 points every 2 seconds seems quite slow.
I'm using TChart 3.5.3425.20244. This is a cut down version of the code I'm using. Unfortunately, I can't provide you with a sample program as this program is talking to hardware.
Have you any ideas?
Thanks
Mike
Code: Select all
for (int i = 0; i < 8; i++)
{
Steema.TeeChart.Styles.FastLine line = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
line.Tag = i;
line.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
}
Code: Select all
for (int i = 0; i < 8; i++)
{
double x1 = DataArray[this.index - 2, 0];
double x2 = DataArray[this.index - 1, 0];
double y1 = DataArray[this.index - 2, i + 1] * 1000.0;
double y2 = DataArray[this.index - 1, i + 1] * 1000.0;
tChart1.Series[i].Add(x1, y1);
tChart1.Series[i].Add(x2, y2);
tChart1.Series[i].RefreshSeries();
}