YOUSEFUL / DELPHI / COMPONENTS
TAtlasPlotTick
One axis tick: its value and its label.
Description
Returned by TAtlasPlotAxis.Ticks.
Members
| Member | Kind | What it does |
|---|---|---|
Value | field | Position of the tick in data units (a TDateTime on a date/time axis). |
Caption | field | The label, as TAtlasPlotAxis.Caption formats the value. |
Fields
Value field
Value: Double;Position of the tick in data units (a TDateTime on a date/time axis).
Caption field
Caption: string;The label, as TAtlasPlotAxis.Caption formats the value.
Examples
Tick positions of a range
Lists the ticks the chart would use for data between 3 and 97.
uses
System.SysUtils, Atlas.PlotAxis;
function TickList: string;
var
Axis: TAtlasPlotAxis;
Tick: TAtlasPlotTick;
begin
Result := '';
Axis := TAtlasPlotAxis.Create;
try
Axis.Prepare(3, 97, 5, True); // rounded outward to 0..100
for Tick in Axis.Ticks(5) do
Result := Result + Tick.Caption + ' '; // 0 20 40 60 80 100
finally
Axis.Free;
end;
end;