Here is a list of point X, Y in a textfile.
I would like to draw the graph with a TEECHART
after reading the file and
while maintaining the real values in the two axes.
thank you for me to proceed
Didier
x;y
0;0
0;-0,02
0;-0,02
0;-0,02
0;0
0;-0,02
0;-0,02
0;-0,02
0;-0,02
0;-0,02
0;0
0;-0,02
0;-0,02
0,01;0
0,03;0,06
0,07;0,1
0,07;0,12
0,1;0,14
0,14;0,16
0,16;0,18
0,18;0,2
0,21;0,22
0,23;0,22
0,36;0,22
0,36;0,26
0,36;0,26
0,38;0,32
0,43;0,32
0,51;0,37
0,58;0,37
0,62;0,32
0,65;0,3
0,69;0,3
0,73;0,28
0,76;0,28
0,78;0,26
0,82;0,26
0,86;0,3
0,93;0,32
0,98;0,32
1,02;0,3
1,06;0,3
1,09;0,3
1,13;0,3
1,19;0,3
1,22;0,3
1,26;0,3
1,3;0,3
1,31;0,3
1,37;0,3
1,39;0,32
1,44;0,32
1,48;0,32
1,5;0,34
1,55;0,34
1,59;0,34
1,61;0,34
1,64;0,37
1,68;0,37
1,72;0,37
1,75;0,37
1,79;0,37
1,83;0,39
1,85;0,41
1,92;0,45
1,97;0,47
2,05;0,49
2,12;0,49
2,18;0,45
2,19;0,45
2,23;0,45
2,27;0,45
2,32;0,45
2,36;0,47
2,4;0,47
2,41;0,47
2,45;0,47
2,49;0,47
2,52;0,49
2,56;0,51
2,58;0,49
2,63;0,49
2,71;0,51
2,71;0,51
2,73;0,51
2,76;0,53
2,8;0,53
2,84;0,53
2,87;0,55
2,91;0,57
2,95;0,59
3;0,59
3,06;0,61
3,09;0,63
3,15;0,63
3,2;0,63
3,28;0,63
3,29;0,63
3,35;0,61
3,37;0,61
3,4;0,61
3,44;0,59
3,48;0,61
3,51;0,61
3,53;0,59
3,57;0,61
3,59;0,61
3,61;0,63
3,64;0,65
3,68;0,65
3,73;0,67
3,77;0,69
3,81;0,71
3,88;0,69
3,88;0,67
3,92;0,69
3,95;0,67
3,97;0,67
4,01;0,74
4,06;0,76
4,12;0,78
4,17;0,78
4,23;0,8
4,28;0,8
4,32;0,76
4,36;0,74
4,39;0,74
4,43;0,74
4,47;0,74
4,47;0,74
4,5;0,74
4,54;0,78
4,6;0,8
4,63;0,82
4,69;0,82
4,76;0,82
4,78;0,82
4,83;0,84
4,87;0,8
4,91;0,8
4,94;0,78
4,98;0,8
4,98;0,8
5,02;0,8
5,04;0,8
5,04;0,8
5,04;0,8
5,04;0,88
5,18;0,92
5,26;0,94
5,29;0,88
5,35;0,86
5,37;0,88
5,42;0,92
5,48;0,94
5,55;0,96
5,6;0,92
5,64;0,9
5,66;0,9
5,71;0,88
5,73;0,9
5,75;0,9
5,79;0,9
5,82;0,9
5,86;0,92
5,9;0,92
5,93;0,98
5,99;1
6,04;1
6,12;1,02
6,15;0,96
6,19;0,96
6,21;0,94
6,24;0,96
6,3;0,96
6,34;0,96
6,35;0,96
6,39;0,96
6,43;0,98
6,45;0,96
6,48;0,98
6,52;0,98
6,56;0,98
6,59;1
6,63;1,02
6,67;1,02
6,7;1
6,74;1,02
6,79;1,02
6,81;1,04
6,83;1,04
6,87;1,04
6,9;1,06
6,96;1,13
7,01;1,13
7,07;1,11
7,11;1,06
7,14;1,06
7,16;1,06
7,22;1,11
7,25;1,11
7,31;1,13
7,34;1,15
7,38;1,15
7,44;1,15
7,49;1,15
7,53;1,15
7,56;1,17
7,62;1,15
7,66;1,17
7,73;1,17
7,77;1,17
7,8;1,17
7,86;1,19
7,91;1,19
7,99;1,15
7,99;1,15
8,020001;1,15
8,060001;1,15
8,08;1,15
8,11;1,17
8,15;1,17
8,19;1,17
8,21;1,19
8,28;1,25
8,33;1,27
8,390001;1,27
8,46;1,29
8,520001;1,23
8,57;1,17
8,57;1,21
8,609999;1,21
8,649999;1,19
8,66;1,21
8,7;1,21
8,72;1,21
8,76;1,21
8,79;1,23
8,810001;1,23
8,850001;1,23
8,87;1,23
8,899999;1,23
8,939999;1,33
8,99;1,33
9,07;1,35
9,140001;1,35
9,18;1,35
9,25;1,35
9,270001;1,29
9,32;1,27
9,34;1,27
9,38;1,27
9,399999;1,27
9,42;1,29
9,45;1,29
9,51;1,35
9,560001;1,39
9,600001;1,39
9,67;1,39
9,71;1,39
9,75;1,33
9,8;1,33
9,82;1,33
9,84;1,31
9,87;1,31
9,91;1,31
9,95;1,43
10;1,43
10,06;1,46
10,11;1,46
10,17;1,46
10,22;1,46
10,28;1,43
10,33;1,37
10,33;1,37
10,37;1,33
10,39;1,33
10,41;1,35
10,42;1,33
10,46;1,37
10,48;1,35
10,5;1,35
10,52;1,37
10,55;1,43
10,61;1,48
10,64;1,5
10,7;1,5
10,75;1,5
10,79;1,5
10,85;1,5
10,9;1,52
10,96;1,5
11,01;1,5
11,05;1,52
11,1;1,52
11,16;1,52
11,21;1,52
11,25;1,5
11,29;1,43
11,3;1,41
11,34;1,43
11,36;1,43
11,38;1,43
11,41;1,43
11,43;1,43
11,45;1,46
11,51;1,5
11,52;1,54
11,56;1,54
11,6;1,52
11,63;1,56
11,69;1,56
11,73;1,56
11,76;1,58
11,82;1,6
11,87;1,6
11,91;1,62
11,96;1,62
12,02;1,62
12,07;1,62
12,11;1,6
TEECHART PRO V7
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
I recommend you to use TSeriesTextSource as in the example on this thread.
Hope this helps!
I recommend you to use TSeriesTextSource as in the example on this thread.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
TEECHART PRO V7 under DELPHI 7
Hi Narcis,
Thank you for your help
I had already noted that example.
the graph displayed
but I can not keep the real values on the axes.
Didier
Thank you for your help
I had already noted that example.
the graph displayed
but I can not keep the real values on the axes.
Didier
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
Narcis,
here is the code :
Thank you very much
Didier
here is the code :
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with SeriesTextSource1 do
begin
Fields.Clear;
AddField('mm', 1);
AddField('KN', 2);
HeaderLines := 1;
FieldSeparator := ';';
DecimalSeparator := ',';
FileName := 'perrier.csv';
Series := Series1;
Chart1.Legend.Visible := false;
Chart1.LeftAxis.Title.Caption := 'KN';
Chart1.LeftAxis.Title.Visible := true;
Chart1.BottomAxis.Title.Caption := 'mm';
Chart1.BottomAxis.Title.Visible := true;
Active := True;
end;
// Series1.GetVertAxis.SetMinMax(-0.02, 1.62);
// Series1.GetHorizAxis.SetMinMax(0, 12.11);
end;
Didier
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
Thanks for the code, now I understand which is your exact problem. What happens is that series doesn't recognise x values field, you should add fields like this:
Thanks for the code, now I understand which is your exact problem. What happens is that series doesn't recognise x values field, you should add fields like this:
Code: Select all
AddField('X', 1);
AddField('Y', 2);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Didier,
I'm not 100% sure if this solved the problem at your end. However, code below works fine for me here changing file headers to the names you mentioned. What I meant is that TSeriesTextSource needs to know to which series ValueList each field is associated to. Since Y ValueLists is the mandatory one here, there's no problem but you should specify which field is for X values.
I'm not 100% sure if this solved the problem at your end. However, code below works fine for me here changing file headers to the names you mentioned. What I meant is that TSeriesTextSource needs to know to which series ValueList each field is associated to. Since Y ValueLists is the mandatory one here, there's no problem but you should specify which field is for X values.
Code: Select all
with SeriesTextSource1 do
begin
Fields.Clear;
AddField('X', 1);
AddField('KN', 2);
HeaderLines := 1;
FieldSeparator := ';';
DecimalSeparator := ',';
FileName := 'c:\temp\perrier.csv';
Series := Series1;
Chart1.Legend.Visible := false;
Chart1.LeftAxis.Title.Caption := 'KN';
Chart1.LeftAxis.Title.Visible := true;
Chart1.BottomAxis.Title.Caption := 'mm';
Chart1.BottomAxis.Title.Visible := true;
Active := True;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 42
- Joined: Mon Jun 11, 2007 12:00 am
- Contact: