From 3ec9c78ab696ad75d8c15d04447ae0aee4970761 Mon Sep 17 00:00:00 2001 From: ask Date: Thu, 18 Mar 2010 14:08:01 +0000 Subject: [PATCH] TAChart: Draw rotated bar series git-svn-id: trunk@24083 - --- components/tachart/taseries.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index 109a90e9ef..a595980904 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -725,8 +725,11 @@ begin ACanvas.Brush.Assign(BarBrush); for i := 0 to Count - 1 do begin p := GetGraphPoint(i); - w := CalcBarWidth(p.X, i); - graphBar := DoubleRect(p.X - w, 0, p.X + w, p.Y); + w := CalcBarWidth(GetGraphPointX(i), i); + if IsRotated then + graphBar := DoubleRect(0, p.Y - w, p.X, p.Y + w) + else + graphBar := DoubleRect(p.X - w, 0, p.X + w, p.Y); if not RectIntersectsRect(graphBar, ext2) then continue; with imageBar do begin