Tcontourseries
Posted: Thu Nov 05, 2015 7:43 am
Is it possible to extract le numerical values of a contourseries for each of the selected levels?
Steema Software - Customer Support Forums
http://493266.hkjq7.group/support/
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));
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;