TAMultiseries.pas fix for #39616 TBoxAndWhiskerSeries cannot use different color on each point for box border, whiskers and median

(cherry picked from commit c4a17bf926)
This commit is contained in:
Frank Freeman 2022-01-30 00:59:35 +00:00 committed by Maxim Ganetsky
parent 80e6a9f2c6
commit b6078e31cb

View File

@ -1023,6 +1023,8 @@ begin
ww := w * WhiskersWidth;
ADrawer.Pen := WhiskersPen;
if (Source[i]^.Color <> clTAColor) and (WhiskersPen.Color = clTAColor) then
ADrawer.SetPenColor(Source[i]^.Color);
ADrawer.SetBrushParams(bsClear, clTAColor);
DoLine(x - ww, ymin, x + ww, ymin);
DoLine(x, ymin, x, yqmin);
@ -1030,11 +1032,17 @@ begin
DoLine(x, ymax, x, yqmax);
ADrawer.Pen := BoxPen;
if Source[i]^.Color <> clTAColor then
ADrawer.SetBrushParams(bsSolid, Source[i]^.Color)
begin
if BoxPen.Color = clTAColor then
ADrawer.SetPenColor(Source[i]^.Color);
ADrawer.SetBrushParams(bsSolid, Source[i]^.Color);
end
else
ADrawer.Brush := BoxBrush;
DoRect(x - wb, yqmin, x + wb, yqmax);
ADrawer.Pen := MedianPen;
if (Source[i]^.Color <> clTAColor) and (MedianPen.Color = clTAColor) then
ADrawer.SetPenColor(Source[i]^.Color);
ADrawer.SetBrushParams(bsClear, clTAColor);
DoLine(x - wb, ymed, x + wb, ymed);
end;