From c2a194543081c0bd7530e1142c2ce6cd63a5360d Mon Sep 17 00:00:00 2001 From: ask Date: Fri, 20 Apr 2012 07:01:32 +0000 Subject: [PATCH] TAChart: Add TeeChart-compatible THorizBarSeries class git-svn-id: trunk@36922 - --- components/tachart/tachartteechart.pas | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/components/tachart/tachartteechart.pas b/components/tachart/tachartteechart.pas index c9a41c8ebb..e1cc02db17 100644 --- a/components/tachart/tachartteechart.pas +++ b/components/tachart/tachartteechart.pas @@ -43,14 +43,32 @@ type property MarginTop: TChartDistance index 2 read GetMargin write SetMargin; end; - TPointerSeries = class(TLineSeries) + TPointSeries = class(TLineSeries) published property LineType default ltNone; property ShowPoints default true; end; + THorizBarSeries = class(TBarSeries) + public + // Swap X and Y as TeeChart does. + function AddXY( + AX, AY: Double; AXLabel: String = ''; AColor: TChartColor = clTAColor): Integer; overload; inline; + published + property AxisIndexX default 0; + property AxisIndexY default 1; + end; + implementation +{ THorizBarSeries } + +function THorizBarSeries.AddXY( + AX, AY: Double; AXLabel: String; AColor: TChartColor): Integer; +begin + Result := inherited AddXY(AY, AX, AXLabel, AColor); +end; + { TChartTeeChart } function TChartTeeChart.GetAxisByAlign1(AIndex: TChartAxisAlignment): TChartAxis;