TAChart: Make TCustomSeries.Clear virtual. Add TChartLinkItem to TACustomSource.

git-svn-id: trunk@51485 -
This commit is contained in:
wp 2016-02-03 11:33:21 +00:00
parent 0a110ac10e
commit ac32b9a35a
2 changed files with 17 additions and 1 deletions

View File

@ -195,7 +195,7 @@ type
AXLabel: String = ''; AColor: TColor = clTAColor): Integer; overload;
function AddY(
AY: Double; ALabel: String = ''; AColor: TColor = clTAColor): Integer; inline;
procedure Clear; inline;
procedure Clear; virtual;
function Count: Integer; inline;
procedure Delete(AIndex: Integer); virtual;
function Extent: TDoubleRect; virtual;

View File

@ -95,6 +95,19 @@ type
end;
PChartDataItem = ^TChartDataItem;
TChartLinkKind = (lkStraight, lkAngled);
TChartLinkItem = packed record
FromIndex: Integer;
ToIndex: Integer;
case Kind: TChartLinkKind of
lkStraight: ();
lkAngled : (ForwardAnglePos: Double;
BackwardAnglePos: array[0..2] of Double);
end;
PChartLinkItem = ^TChartLinkItem;
TGraphToImageFunc = function (AX: Double): Integer of object;
TIntegerTransformFunc = function (AX: Integer): Integer of object;
@ -145,6 +158,8 @@ type
function GetCount: Integer; virtual; abstract;
function GetItem(AIndex: Integer): PChartDataItem; virtual; abstract;
function GetLink(AIndex: Integer): PChartLinkItem; virtual; abstract;
function GetLinkCount: Integer; virtual; abstract;
procedure InvalidateCaches;
procedure Notify;
procedure SetYCount(AValue: Cardinal); virtual; abstract;
@ -178,6 +193,7 @@ type
property Broadcaster: TBroadcaster read FBroadcaster;
property Count: Integer read GetCount;
property Item[AIndex: Integer]: PChartDataItem read GetItem; default;
property Link[AIndex: Integer]: PChartLinkItem read GetLink;
property YCount: Cardinal read FYCount write SetYCount default 1;
end;