YOUSEFUL / DELPHI / COMPONENTS
TAtlasPlotStacking
How TAtlasPlot stacks bar and area series.
Description
Value of TAtlasPlot.Stacking. Bars stack only with bars and areas only with areas, matched by equal arguments; lines, steps and points are never stacked. Positive and negative values build separate stacks.
Members
| Member | Kind | What it does |
|---|---|---|
psNone | value | No stacking: bars at one argument stand side by side in a group, areas overlap. |
psStacked | value | Each bar or area starts where the previous series of its kind ended at that argument. |
psStacked100 | value | Like psStacked, with each argument's stack scaled to 100 % of the sum of absolute values. |
Values
psNone value
psNoneNo stacking: bars at one argument stand side by side in a group, areas overlap. The default.
psStacked value
psStackedEach bar or area starts where the previous series of its kind ended at that argument.
psStacked100 value
psStacked100Like psStacked, with each argument's stack scaled to 100 % of the sum of absolute values. The value axis then counts percent; pmValue marks still show the original values.
Examples
Stacked areas
Three area series stacked on each other.
uses
Atlas.Plot, Atlas.PlotSeries;
procedure StackedSessions(Plot: TAtlasPlot);
var
Month: Integer;
begin
Plot.Stacking := psStacked;
Plot.AddSeries('Desktop', pkArea);
Plot.AddSeries('Mobile', pkArea);
Plot.AddSeries('Tablet', pkArea);
for Month := 1 to 12 do
begin
Plot.Series[0].Add(Month, 40 + Month);
Plot.Series[1].Add(Month, 30 + 2 * Month);
Plot.Series[2].Add(Month, 10);
end;
end;