colors

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
schroeder
Newbie
Newbie
Posts: 3
Joined: Tue Apr 13, 2010 12:00 am

colors

Post by schroeder » Tue Jul 13, 2010 7:53 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: colors

Post by Yeray » Tue Jul 13, 2010 10:46 am

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply