Tcontourseries
Tcontourseries
Is it possible to extract le numerical values of a contourseries for each of the selected levels?
Re: Tcontourseries
Hello,
Excuse us for the delayed reply here.
Is this what you are trying to do?
Excuse us for the delayed reply here.
Is this what you are trying to do?
Code: Select all
var i: Integer;
begin
Chart1.Draw;
for i:=0 to Series1.Levels.Count-1 do
Memo1.Lines.Add(FormatFloat('#'+FormatSettings.ThousandSeparator+'##0'
+FormatSettings.DecimalSeparator+'###', Series1.Levels[i].UpToValue));
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Tcontourseries
In the above example, I have lines at Level=59.919 . Level=57.437, ... some levels can be splitted in diffent level curve (here for example L=42.544 or 47.508 or...)
The goal is to save the equipotential/isothrm/equi-xxx positions for an external use.
best regards
Re: Tcontourseries
Hello,
I understand you are looking for the arrays of Points into the Segments into the Levels. Here you have a simple example printing all the X and Y values for each Points array in each Segment in each Level:
I understand you are looking for the arrays of Points into the Segments into the Levels. Here you have a simple example printing all the X and Y values for each Points array in each Segment in each Level:
Code: Select all
var Series1: TContourSeries;
procedure TForm1.FormCreate(Sender: TObject);
var i, j, m: Integer;
lvl: TContourLevel;
seg: TLevelSegment;
begin
Chart1.View3D:=false;
Series1:=Chart1.AddSeries(TContourSeries) as TContourSeries;
Series1.FillSampleValues();
Series1.Marks.Visible:=true;
Chart1.Draw;
Memo1.ScrollBars:=ssVertical;
Memo1.Lines.Clear;
for i:=0 to Series1.Levels.Count-1 do
begin
lvl:=Series1.Levels.Items[i];
Memo1.Lines.Add('Level: ' + IntToStr(i) + ', UpToValue: ' + FormatFloat('#,##0.###', lvl.UpToValue));
for j:=0 to length(lvl.Segments)-1 do
begin
seg:=lvl.Segments[j];
Memo1.Lines.Add('Segment: ' + IntToStr(j));
for m:=0 to length(seg.Points)-1 do
begin
Memo1.Lines.Add('Point[' + IntToStr(m) + ']: (' + FormatFloat('#,##0.###', seg.Points[m].X) + ',' + FormatFloat('#,##0.###', seg.Points[m].Y) + ')');
end;
Memo1.Lines.Add('');
end;
Memo1.Lines.Add('');
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Tcontourseries
Tank you very much! It is exactelly le answer I was loocking for.