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

This commit is contained in:
Frank Freeman 2022-01-30 00:59:35 +00:00
parent 7f6c15e911
commit c4a17bf926

View File

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