From 87be7a4818f02c2f6888018f1e7224a4cc995fe4 Mon Sep 17 00:00:00 2001 From: wp Date: Sat, 16 Feb 2019 22:37:02 +0000 Subject: [PATCH] TAChart: Make TBarSeries use datapoint color without overriding style color. git-svn-id: trunk@60442 - --- components/tachart/taseries.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index 8d75ab20b1..6de34be453 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -79,9 +79,9 @@ type constructor Create(AOwner: TComponent); override; destructor Destroy; override; public - function GetBarWidth(AIndex: Integer): Integer; procedure Draw(ADrawer: IChartDrawer); override; function Extent: TDoubleRect; override; + function GetBarWidth(AIndex: Integer): Integer; function GetNearestPoint(const AParams: TNearestPointParams; out AResults: TNearestPointResults): Boolean; override; published @@ -1135,13 +1135,13 @@ var c: TColor; ic: IChartTCanvasDrawer; begin - ADrawer.Brush := BarBrush; ADrawer.Pen := BarPen; - if Styles <> nil then - Styles.Apply(ADrawer, stackIndex); + ADrawer.Brush := BarBrush; c := Source[pointIndex]^.Color; if c <> clTAColor then ADrawer.BrushColor := c; + if Styles <> nil then + Styles.Apply(ADrawer, stackIndex); sz := Size(AR); if (sz.cx <= 2) or (sz.cy <= 2) then begin // Bars are too small to distinguish the border from the interior.