BoxChart cannot be color coded lazarus / 55-TAChart ---------------------------------------------------------------------- kiyo · 2023-05-31 01:17 BoxChart cannot be color coded Add 5 BoxAndWshiskerSeries to the TChart and color code them. Chart1BoxAndWhiskerSeries1.BoxBrush.Color := clBlue; Chart1BoxAndWhiskerSeries2.BoxBrush.Color := clYellow; Chart1BoxAndWhiskerSeries3.BoxBrush.Color := clRed; Chart1BoxAndWhiskerSeries4.BoxBrush.Color := clGreen; Chart1BoxAndWhiskerSeries5.BoxBrush.Color := clAqua; In the Legend display, the 5 Legends are correctly color-coded. But in MainChart,all BoxChart become clBlue. In this case, ChartColor has no way of knowing which Box is which data. How can I fix it? OS:Windows10 pro, Lazarus Version:2.2.0 ---------------------------------------------------------------------- wp · 2023-05-31 08:10 Without seeing your code, I speculate that you added all values to the first series. The other series are empty but nevertheless listed in the legend. There are two options: - Use only one series to which you add all data points and specify the color in the AddXY call (the BoxBrush is ignored in this case) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Chart1BoxAndWhiskerSeries1.AddXY(0, 1, 2, 3, 4, 5, '', clBlue);   Chart1BoxAndWhiskerSeries1.AddXY(1, 2, 3, 4, 5, 6, '', clYellow);   Chart1BoxAndWhiskerSeries1.AddXY(2, 2.5, 3.1, 3.9, 5.1, 5.9, '', clRed); - Or use a dedicated series for each single data point, do not use the AddXY color, but control the color by the BoxBrush property Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Chart1BoxAndWhiskerSeries1.AddXY(0, 1, 2, 3, 4, 5);  Chart1BoxAndWhiskerSeries2.AddXY(1, 2, 3, 4, 5, 6);  Chart1BoxAndWhiskerSeries3.AddXY(2, 2.5, 3.1, 3.9, 5.1, 5.9); ---------------------------------------------------------------------- kiyo · 2023-05-31 18:35 I was able to solve the problem. I am amazed at your insight. Thanks for the good advice.