From d48841a758fda7427ce127fe27375425cac2c68c Mon Sep 17 00:00:00 2001 From: ask Date: Wed, 23 Feb 2011 16:19:25 +0000 Subject: [PATCH] TAChart: Fix bar series drawing so that Source.Color, if set, overrides both BarBrush.Color and Styles.Brush.Color. Fixes issue #18810 git-svn-id: trunk@29657 - --- components/tachart/taseries.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index d65fb2fb97..cd91548c0e 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -756,11 +756,15 @@ var var sz: TSize; defaultDrawing: Boolean = true; + c: TColor; begin ADrawer.Brush := BarBrush; ADrawer.Pen := BarPen; if Styles <> nil then Styles.Apply(ADrawer, stackIndex); + c := Source[pointIndex]^.Color; + if c <> clTAColor then + ADrawer.BrushColor := c; sz := Size(AR); if (sz.cx <= 2) or (sz.cy <= 2) then begin // Bars are too small to distinguish the border from the interior. @@ -835,7 +839,6 @@ begin Exchange(p.X, p.Y); p.X += ofs; cumulHeight := z; - ADrawer.BrushColor := GetColor(pointIndex); stackIndex := 0; BuildBar(p.Y - z); for stackIndex := 1 to Source.YCount - 1 do