TContourSeries

TContourSeries
Hierarchy     Properties     Methods     Events     

Isolines from XYZ surfaces.




Unit
TeeSurfa

Description
Calculates and displays "isolines" from a custom array of XYZ points.

The number of contour levels can be specified from 1 to 250.
To see a visual representation of this Series type, go to the TeeChart User Guide.

The Surface's UseColorRange and UsePalette properties also apply to contour series.

Each contour Level can be coloured using a range (ie: from blue to white) or a "Palette", which can be customized for specific value intervals (ie: red from 100 to 200, green from 201 to 400 ). Same as with TSurfaceSeries.

Contour points can be assigned to a Surface and vice-versa:


Series1.AssignValues( Series2 );

Each Level can be colored using a different color by doing:

ContourSeries1.ColorEachPoint := True;

Levels can be displayed at custom "Y" vertical positions:

ContourSeries1.YPosition := 123;

Each Level can display at it's own Level "Y" position by setting this property:

ContourSeries1.YPositionLevel := True;

The ContourSeries, by default, shows at the Legend one item for each corresponding Contour "Level". The Contour Series has an event "OnGetLevel" which can be used to override each automatic Level "Value" and "Color":

procedure TForm1.Series1GetLevel(Sender: TContourSeries;
LevelIndex: Integer; var Value: Double; var Color: TColor);
begin
Value:=LevelIndex*100.0;
if Value<500 then Color:=clBlue
else Color:=clRed;
end;


The "LevelIndex" parameter specifies each contour level, from 0 to NumLevels-1.

*Note

ContourSeries1.MaxYValue and MinYValue refer to Contour Y values.

Since version 5, this depends on the 2D / 3D setting.
When the Chart is in 2D mode (Chart1.View3D:=False) then Contour MaxYValue and MinYValue methods return the Z values minimum and maximum values.
In 3D mode, the behaviour is the same as in version 4 (they refer to Contour Y values).
To remain independent on the above issue, you should use Contour.YValues.MaxValue and Contour.YValues.MinValue properties.