TAChart: Add TDbChartSource.DataSet utility method

git-svn-id: trunk@38026 -
This commit is contained in:
ask 2012-07-24 06:56:34 +00:00
parent 50d7b1e880
commit 578f8ab54a

View File

@ -41,7 +41,7 @@ type
FFieldYList: TStringList; FFieldYList: TStringList;
FOptions: TDbChartSourceOptions; FOptions: TDbChartSourceOptions;
function GetDataSource: TDataSource; function GetDataSource: TDataSource; inline;
procedure SetDataSource(AValue: TDataSource); procedure SetDataSource(AValue: TDataSource);
procedure SetFieldColor(const AValue: String); procedure SetFieldColor(const AValue: String);
procedure SetFieldText(const AValue: String); procedure SetFieldText(const AValue: String);
@ -58,6 +58,7 @@ type
public public
procedure AfterDraw; override; procedure AfterDraw; override;
procedure BeforeDraw; override; procedure BeforeDraw; override;
function DataSet: TDataSet; inline;
procedure Reset; procedure Reset;
published published
property DataSource: TDataSource read GetDataSource write SetDataSource; property DataSource: TDataSource read GetDataSource write SetDataSource;
@ -157,6 +158,11 @@ begin
FYCount := 0; // Set to 1 by inherited. FYCount := 0; // Set to 1 by inherited.
end; end;
function TDbChartSource.DataSet: TDataSet;
begin
Result := FDataLink.DataSet;
end;
destructor TDbChartSource.Destroy; destructor TDbChartSource.Destroy;
begin begin
FreeAndNil(FDataLink); FreeAndNil(FDataLink);