From 0bc0484c5201b7f39202c28f7a96722bb527f840 Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Fri, 17 Sep 2021 21:28:48 +0200 Subject: [PATCH] TAChart: Find point index error in relation with ColorEach of line series (https://forum.lazarus.freepascal.org/index.php/topic,56324.msg418533.html#msg418533). (cherry picked from commit 925e2e73708719040c10f6208aa0ab35c73a5900) --- components/tachart/taseries.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tachart/taseries.pas b/components/tachart/taseries.pas index fcd77af8eb..fbb9fa1705 100644 --- a/components/tachart/taseries.pas +++ b/components/tachart/taseries.pas @@ -672,7 +672,7 @@ var ADrawer.Pen := LinePen; imgPt1 := ParentChart.GraphToImage(gp); - col1 := GetPtColor(i); + col1 := GetPtColor(i + FLoBound); // First line for line type ltFromOrigin if LineType = ltFromOrigin then begin @@ -693,7 +693,7 @@ var hasBreak := false; end; imgPt2 := ParentChart.GraphToImage(gp); - col2 := GetPtColor(i); + col2 := GetPtColor(i + FLoBound); if imgPt1 <> imgPt2 then begin case FColorEach of ceLineBefore, cePointAndLineBefore: col := col2;