From d496b94a038cd034d5f18689af8efeb65f6cd46c Mon Sep 17 00:00:00 2001 From: wp Date: Tue, 24 Jul 2018 14:10:46 +0000 Subject: [PATCH] TAChart: Fix TFitSeries axis rotation. git-svn-id: trunk@58616 - --- components/tachart/tafuncseries.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/tachart/tafuncseries.pas b/components/tachart/tafuncseries.pas index af015ada64..7870bf3a3f 100644 --- a/components/tachart/tafuncseries.pas +++ b/components/tachart/tafuncseries.pas @@ -1530,8 +1530,13 @@ begin ext.b := AxisToGraph(b); end; NormalizeRect(ext); - AXMin := GraphToAxisX(ext.a.X); - AXMax := GraphToAxisX(ext.b.X); + if IsRotated then begin + AXMin := GraphToAxisY(ext.a.Y); + AXMax := GraphToAxisY(ext.b.Y); + end else begin + AXMin := GraphToAxisX(ext.a.X); + AXMax := GraphToAxisX(ext.b.X); + end; EnsureOrder(AXMin, AXMax); FFitRange.Intersect(AXMin, AXMax); end;