Page 1 of 1
colors
Posted: Tue Jul 13, 2010 7:53 am
by 16455642
When modifying the colors of a line series, the marker on the button "color" changes into the selected color, but it doesn't have any effect on the chart.
I have to choose the buttom "borders" to change the line color in the chart. Is there any bug fix or workaround?
I'm using VCL v2010
Re: colors
Posted: Tue Jul 13, 2010 10:46 am
by yeray
Hi schroeder,
You have to set ColorEach to true. At design time you'll find this checkbox at
Series tab,
Format tab.
Note that selecting this, all the line points (and thus the line segments) are assigned each one with a color of the color palette. So if you only want a segment to be drawn in a different color, you'll have to change all your points colors to the same. For example, at runtime:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.AddSeries(TLineSeries);
Chart1[0].FillSampleValues(10);
Chart1[0].ColorEachPoint:=true;
for i:=0 to Chart1[0].Count-1 do
Chart1[0].ValueColor[i]:=Chart1[0].Color;
Chart1[0].ValueColor[5]:=clRed;
end;