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 -
This commit is contained in:
ask 2011-02-23 16:19:25 +00:00
parent c8f3c56e61
commit d48841a758

View File

@ -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