The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_rchart
Class: TContourPlot
Declaration: property TextLabels[ix: integer]: TTextLabel;

The array property TextLabels contains the specifications of up to MaxTxtLbl user-defined text labels. The parameter ix may vary between 1 and MaxTxtLbl.

The property TextLabels provides the following sub-properties:
property PosX: double;
property PosY: double;
property Layer: integer;
property AttachToData: TTxtLblAttachMode;
property ColorBkg: TColor;
property ColorBorder: TColor;
property ColorShadow: TColor;
property TransParent: boolean;
property Alignment: TAlignment;
property VerticalAlignment: TVerticalAlignment;
property Font: TFont;
property Mode: TTxtLblMode;
property Caption: string;
property ShadowDx: integer;
property ShadowDy: integer;
property Visible: boolean;
property OnChange: TNotifyEvent;

PosX Position on x-axis. The position is interpreted as chart coordinates, if the property AttachToData is TRUE. Otherwise the position is regarded as pixel coordinates of the component window. The reference point of the text label is the middle of the label.
PosY Position on y-axis. The position is interpreted as chart coordinates, if the property AttachToData is TRUE. Otherwise the position is regarded as pixel coordinates of the chart window. The reference point is the bottom of the label.
Layer The layer the label belongs to. This value is ignored by TContourPlot.
AttachToData The property AttachToData determines how the position coordinates PosX and PosY are interpreted by the chart. If AttachToData is tlamBoth the position values are seen as real world chart coordinates, thus "attaching" the label to the chart contents (panning or zooming the chart, also moves the labels). If AttachToData is tlamNone, the position information is interpreted as screen coordinates (pixels) relative to the left top corner of the chart window. In this case the label stays in its place when the data chart is zoomed or panned. The values tlamXOnly and tlamYOnly show a mixed behavior, attaching one coordinate to the chart and the other to the window.

Please note that changing the attach mode during run-time requires to convert the current label coordinates from screen to chart coordinates and vice versa - otherwise the label will most probably get "lost" (use the methods R2M and M2R for conversion).

ColorBkg Color of the label background. The background color is only effective if the Transparent property is false. Note that the color of the text can be adjusted by setting the Color property of the Font.
ColorBorder Color of the label frame (Mode = tlBox) or the line below the label (Mode = tlUnderline ).
ColorShadow Color of the shadow of a label (Mode = tlShadow ). By default, ColorShadow is clGray.
ShadowDx, ShadowDy Horizontal and vertical shift of the shadow (Mode = tlShadow ).
Transparent The background of the label is transparent if the property Transparent is set TRUE. In this case the background color is ignored. Please note that the Transparent property has no effect for shadowed labels (Mode = tlShadow ).
Alignment The property Alignment determines the horizontal alignment of the text. Alignment may have the following values: taLeftJustify, taRightJustify, and taCenter.
VerticalAlignment The property VerticalAlignment determines the vertical alignment of the text. VerticalAlignment may have the following values: vaTop, vaCenter, and vaBottom.
Font The font of the label. You can select any font, style and color by setting the font properties (see Delphi manual for details).
Mode Defines the layout of the label (tlOff... label is invisible, tlSimple... just text without any lines tlUnderline... text is underlined, tlBox... a rectangular box is drawn around the label, tlShadow... a non-transparent box with a shadow is drawn)
Caption The text to be displayed. The text may have a maximum length of 255 characters. When the text contains an LF character (ASCII 10) a new line is generated, allowing a label to show several lines.
Visible The property Visible controls the visibility of the label. Please note the subtle difference between the properties Visible and Mode: setting Mode to tlOff has the same visual effect as setting Visible to FALSE; however, the associated structure in memory is made available for adding new labels by AddTextLabel when Mode is set to tlOff.
OnChange Event triggered when any parameter of the text label is changed.

Last Update: 2023-Dec-13