YOUSEFUL / DELPHI / COMPONENTS
TAtlasPlotPoint
One stored point of a series: argument, value, gap flag, text and colour.
Description
Returned by TAtlasPlotSeries.Points[Index] (the default property, so Series[I]) as a copy. Change a value with SetY, or Delete and add again; assigning to the fields of the copy does not change the series.
Members
| Member | Kind | What it does |
|---|---|---|
X | field | The argument. |
Y | field | The value. |
IsNull | field | True for a gap added with AddNull: lines and areas break there and bars skip it. |
Text | field | Optional label. |
Color | field | clDefault uses the series colour (the palette by point index for pie slices). |
Fields
X field
X, Y: Double;The argument. A TDateTime when the argument axis is date/time. Also set for gaps.
Y field
X, Y: Double;The value. 0 and meaningless for a gap.
IsNull field
IsNull: Boolean;True for a gap added with AddNull: lines and areas break there and bars skip it.
Text field
Text: string;Optional label. On the first visible series it becomes the category tick at X; with pmText marks it labels the point; on a pie it names the slice in the legend.
Color field
Color: TColor;clDefault uses the series colour (the palette by point index for pie slices). Another colour fills this bar, dot or slice; lines themselves keep the series colour.
Examples
Read points back
Lists every point of a series, gaps included.
uses
System.SysUtils, Atlas.PlotSeries;
function Describe(Series: TAtlasPlotSeries): string;
var
I: Integer;
P: TAtlasPlotPoint;
begin
Result := '';
for I := 0 to Series.Count - 1 do
begin
P := Series[I]; // a copy: change values with SetY
if P.IsNull then
Result := Result + Format('%g: gap', [P.X]) + sLineBreak
else
Result := Result + Format('%g: %g %s', [P.X, P.Y, P.Text]) + sLineBreak;
end;
end;