From eb68cbfbf31479d012deae393992d0f0b3abcebf Mon Sep 17 00:00:00 2001 From: wp Date: Thu, 20 Nov 2014 23:33:51 +0000 Subject: [PATCH] TAChart: Fix incorrect operation of transformations on y axis of TConstantLineSeries (related to issue #26265) git-svn-id: trunk@46916 - --- components/tachart/taseries.pas | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index 745c5e37d4..3a2aa074cd 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -271,6 +271,7 @@ type function GetSeriesColor: TColor; procedure SavePosToCoord(var APoint: TDoublePoint); procedure SetArrow(AValue: TChartArrow); + procedure SetAxisIndexX(AValue: TChartAxisIndex); procedure SetLineStyle(AValue: TLineStyle); procedure SetPen(AValue: TPen); procedure SetPosition(AValue: Double); @@ -294,7 +295,7 @@ type published property Active default true; property Arrow: TChartArrow read FArrow write SetArrow; - property AxisIndexX; + property AxisIndexX write SetAxisIndexX; property LineStyle: TLineStyle read FLineStyle write SetLineStyle default lsHorizontal; property Pen: TPen read FPen write SetPen; @@ -846,6 +847,16 @@ begin UpdateParentChart; end; +procedure TConstantLine.SetAxisIndexX(AValue: TChartAxisIndex); +begin + inherited AxisIndexX := AValue; + AxisIndexY := AValue; + // Make sure that both axis indexes have the same value. The ConstantLineSeries + // does use only the x axis index, but transformations of the y axis outside + // this unit may require tha y axis index - which would not be correct without + // this here... +end; + procedure TConstantLine.SetLineStyle(AValue: TLineStyle); begin if FLineStyle = AValue then exit;