From feb46ca59a483e3abfc9d94e7548e50baa4937f8 Mon Sep 17 00:00:00 2001 From: wp Date: Wed, 25 Mar 2015 08:43:48 +0000 Subject: [PATCH] TAChart: Fix centering of axis title for chart panes git-svn-id: trunk@48501 - --- components/tachart/tachartaxis.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/tachart/tachartaxis.pas b/components/tachart/tachartaxis.pas index c493c59b0b..9ccfa75310 100644 --- a/components/tachart/tachartaxis.pas +++ b/components/tachart/tachartaxis.pas @@ -744,9 +744,13 @@ begin end; if not Title.PositionOnMarks then FTitlePos := (rmin + rmax) div 2 - else if minc < MaxInt then + else if minc < MaxInt then begin + c := FHelper.GraphToImage(FHelper.FMaxForMarks); + if c < maxc then maxc := c; + c := FHelper.GraphToImage(FHelper.FMinForMarks); + if c > minc then minc := c; FTitlePos := (maxc + minc) div 2 - else + end else FTitlePos := MaxInt; if Arrow.Visible then