TAChart: Add AIncludeHidden parameter to the TChart.GetLegendItems function.

Based on code by Werner.

git-svn-id: trunk@31359 -
This commit is contained in:
ask 2011-06-24 13:39:11 +00:00
parent 8bdf87abed
commit edac0eec23

View File

@ -279,7 +279,7 @@ type
procedure DrawLegendOn(ACanvas: TCanvas; var ARect: TRect);
procedure EnableRedrawing;
function GetFullExtent: TDoubleRect;
function GetLegendItems: TChartLegendItems;
function GetLegendItems(AIncludeHidden: Boolean = false): TChartLegendItems;
procedure PaintOnAuxCanvas(ACanvas: TCanvas; ARect: TRect);
procedure PaintOnCanvas(ACanvas: TCanvas; ARect: TRect);
procedure SaveToBitmapFile(const AFileName: String); inline;
@ -924,7 +924,7 @@ begin
end;
end;
function TChart.GetLegendItems: TChartLegendItems;
function TChart.GetLegendItems(AIncludeHidden: Boolean): TChartLegendItems;
var
i: Integer;
begin
@ -932,7 +932,7 @@ begin
try
for i := 0 to SeriesCount - 1 do
with Series[i] do
if Active and GetShowInLegend then
if AIncludeHidden or (Active and GetShowInLegend) then
GetLegendItemsBasic(Result);
except
FreeAndNil(Result);