September 16th, 2012, 12:22 AM
Changing TChart legend colour
I have an application which creates a line chart using the TChart component. The default third colour in the pallette is yellow which is difficult to see on a white background.
I changed the colour of the third series to blue using the following:
for i:= 0 to 2 do
with Chart1.Series[i] do
for j := 7 to 106 do
if i <> 2 then AddXY(100-(j-6),StrToFloat(ChartArray[NumberOfRows+i+1,j]),'',)
This works for the chart but the colour of the line in the legend is still yellow.
How do I make the legend the same colour as the series?
September 16th, 2012, 05:31 AM
I found the solution by adding the line: