Can several series be concatenated to form a series?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HotSteemar
Newbie
Newbie
Posts: 9
Joined: Wed Nov 19, 2003 5:00 am

Can several series be concatenated to form a series?

Post by HotSteemar » Thu Mar 24, 2005 1:38 pm

Or, can a series be drawn by several Add() action?

Hi,
I am writing a realtime data processig application with TeeChart series graphs. In my application, the typical horizontal axis range is 10 sec, while the data for the series are supplied from the data acquisition system every second. That necessitates the piecewise drawing of the series.
One series for 10sec time period could be completed by succession of 10 times of 1sec data drawing.

Alas! I do not know how to acomplish this kind of successive drawing.
What I tried to do is like this:

Code: Select all

static int callCount=0;
void handlerOf_Event(object sender, System.EventArgs e)
{
	int N=10;
	double[] x=new double[N];
	double[] y=new double[N];
	for(int i=0;i<N;i++)
	{
		x[i]=(double)( i + N*callCount );
		y[i]=Math.Sin(x[i]*0.1)*10;
	}
	this.tChart1.Series[0].Add(x,y);

	callCount++;
	if(callCount>=10)
	{
		callCount=0;
		this.tChart1.Series[0].Delete(0,this.tChart1.Series[0].Count);
		this.tChart1.Refresh();
	}

}

The above code results in the drawing of only one 1-sec-piece of the series on every call of the event handler.

So, how should I do to get the sereis drawing like this?
On the 1st call: 0-1sec piece drawn.
On the 2nd call: 0-1sec piece + 1-2sec piece drawn.
On the 3rd call: 0-1sec piece + 1-2sec piece + 2-3sec piece
etc.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 29, 2005 9:30 am

Hi HotSteemar,

Which type of series are you using? Maybe having a look at this technical article about real time charting helps you with this issue. The article uses Delphi but you shouldn't have much problems porting it to .NET.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply