mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-06 13:39:26 +01:00
TAChart: Add AIncludeHidden parameter to the TChart.GetLegendItems function.
Based on code by Werner. git-svn-id: trunk@31359 -
This commit is contained in:
parent
8bdf87abed
commit
edac0eec23
@ -279,7 +279,7 @@ type
|
|||||||
procedure DrawLegendOn(ACanvas: TCanvas; var ARect: TRect);
|
procedure DrawLegendOn(ACanvas: TCanvas; var ARect: TRect);
|
||||||
procedure EnableRedrawing;
|
procedure EnableRedrawing;
|
||||||
function GetFullExtent: TDoubleRect;
|
function GetFullExtent: TDoubleRect;
|
||||||
function GetLegendItems: TChartLegendItems;
|
function GetLegendItems(AIncludeHidden: Boolean = false): TChartLegendItems;
|
||||||
procedure PaintOnAuxCanvas(ACanvas: TCanvas; ARect: TRect);
|
procedure PaintOnAuxCanvas(ACanvas: TCanvas; ARect: TRect);
|
||||||
procedure PaintOnCanvas(ACanvas: TCanvas; ARect: TRect);
|
procedure PaintOnCanvas(ACanvas: TCanvas; ARect: TRect);
|
||||||
procedure SaveToBitmapFile(const AFileName: String); inline;
|
procedure SaveToBitmapFile(const AFileName: String); inline;
|
||||||
@ -924,7 +924,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TChart.GetLegendItems: TChartLegendItems;
|
function TChart.GetLegendItems(AIncludeHidden: Boolean): TChartLegendItems;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
@ -932,7 +932,7 @@ begin
|
|||||||
try
|
try
|
||||||
for i := 0 to SeriesCount - 1 do
|
for i := 0 to SeriesCount - 1 do
|
||||||
with Series[i] do
|
with Series[i] do
|
||||||
if Active and GetShowInLegend then
|
if AIncludeHidden or (Active and GetShowInLegend) then
|
||||||
GetLegendItemsBasic(Result);
|
GetLegendItemsBasic(Result);
|
||||||
except
|
except
|
||||||
FreeAndNil(Result);
|
FreeAndNil(Result);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user