control the data which come from CSV file

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ljoli
Newbie
Newbie
Posts: 24
Joined: Wed Apr 28, 2010 12:00 am
Location: Paris, FRANCE

control the data which come from CSV file

Post by ljoli » Tue May 11, 2010 4:12 pm

Good evening,

I wrote a program for create a chart with a CSV file like that :

Code: Select all

10	0,0
20	1,5
40	2,5
50	10
60	20
70	30
80	50
85	62,5
90	75
100	55
105	40
110	30
120	15
130	7,5
140	2,5
150	1,5
160	0,0
170	0
180	2
185	6
186	7
187	10
210	0,0
220	1,5
240	2,5
250	10
260	20
270	30
280	50
285	62,5
290	75
300	55
305	40
310	30
320	15
330	7,5
340	2,5
350	1,5
360	0,0
365	20
370	30
380	1,5
400	0,0
410	0
420	2
425	6
430	7
435	10
440	20

The program which build a graph is :

Code: Select all

            // ************************* //
            // build graph with csv file //
            // ************************* //

            // new fatline of steema library
            FastLine fast1;

            //clear the chart
            tChart1.Clear();

            // disable of view in 3D
            this.tChart1.Aspect.View3D = false;

            // title of the chart
            tChart1.Header.Text = "graph build with a CSV file";
            
            tChart1.Aspect.View3D = false;
            tChart1.Legend.Visible = false;
            tChart1.AutoRepaint = true;

            fast1 = new FastLine(tChart1.Chart);
                       
            TextSource textsource1 = new TextSource("C:\\Users\\xxx\\testone.csv");
            textsource1.DecimalSeparator = ',';
            textsource1.Separator =Convert.ToChar("\t");
            fast1.DataSource = textsource1;
            textsource1.Fields.Add(0, "X");
            textsource1.Fields.Add(1, "Y");
But I would like to make some calculation with all the data. For example, find the first pulse and determinate the barycentre.
So , My question is : How have the values of my chart to calculate the barycentre of the first pulse ?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: control the data which come from CSV file

Post by Yeray » Wed May 12, 2010 3:20 pm

Hi

I'm afraid TeeChart hasn't a barycentre function to do that for you, so you should find the peaks and calculate the barycentre manually. What I've seen here is that the barycentre seems to be related with the ternary, one of TeeChart's newest series. You can see a demo of it in Welcome !\New Series\Ternary Series, if it helps.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ljoli
Newbie
Newbie
Posts: 24
Joined: Wed Apr 28, 2010 12:00 am
Location: Paris, FRANCE

Re: control the data which come from CSV file

Post by ljoli » Wed May 12, 2010 4:11 pm

First of all, thanks for your answer.

But I don't found the demo : Welcome !\New Series\Ternary Series

Image

I had the version 3.5.3188.18562 of teechart.

Is it in a new release ?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: control the data which come from CSV file

Post by Yeray » Wed May 12, 2010 4:17 pm

Hi ljoli,

It was a new series in TeeChart for .NET v2009. You can see it in the eval:
http://www.steema.com/evaluation/net
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply