YOUSEFUL / DELPHI / COMPONENTS

TAtlasLegendEntry

One line of a legend drawn by TAtlasCustomChart.DrawLegend: a caption and a swatch colour.

Record Unit Atlas.ProChart · Product Atlas Plot Pro

Description

Passed in an array to the protected DrawLegend of TAtlasCustomChart when a descendant draws its legend. The radar chart builds one entry per series.

Members

MemberKindWhat it does
CaptionfieldText beside the swatch; shortened with ... when the legend column is too narrow.
ColorfieldFill and outline of the square swatch.

Fields

Caption field

Caption: string;

Text beside the swatch; shortened with ... when the legend column is too narrow.

Color field

Color: TColor;

Fill and outline of the square swatch. Resolve clDefault yourself (for example with PaletteColor) before drawing.

Examples

Build legend entries

Inside a descendant's DrawChart, pass the entries to DrawLegend and draw into the area it returns.

pascal
uses
  Atlas.ProChart;

function TwoEntries: TArray<TAtlasLegendEntry>;
begin
  SetLength(Result, 2);
  Result[0].Caption := 'Measured';
  Result[0].Color := TAtlasCustomChart.PaletteColor(0);
  Result[1].Caption := 'Target';
  Result[1].Color := AtlasAxisColor;
end;

TAtlasCustomChart

Also in Atlas Plot Pro

TAtlasBoxPlot · TAtlasHeatMap · TAtlasPolarPlot