Color disappear when I change a level value

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Grunvald
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2002 12:00 am

Color disappear when I change a level value

Post by Grunvald » Fri Mar 11, 2005 4:52 pm

Hello,

I have a TContourSeries which contains lots of XYZ value.
When I write the following lines :

Series.CreateAutoLevels;
Series.NumLevels := 10;
Series1.EndColor := clBlue;
Series1.MidColor := ClGreen;
Series1.StartColor := clRed;
Series1.UseColorRange := true;

With that, the color palette is good.
I would like to have the possibility to draw the levels with a specified value.
For example, I write :
Series.Levels [0].UpToValue := 50;

But when I add this line, all the color become white and I lose all the color palette...

Can you help to find the solution ??? :cry:

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Mar 21, 2005 4:25 pm

Hi,

you should define each level value, as in the following code :

Code: Select all

  Series1.NumLevels:=10;
  Series1.CreateAutoLevels;
  With Series1.Levels do
  begin
    Items[0].UpToValue:=-1;
    Items[1].UpToValue:=-0.8;
    Items[2].UpToValue:=-0.6;
    Items[3].UpToValue:=-0.4;
    Items[4].UpToValue:=-0.2;
    Items[5].UpToValue:= 0;
    Items[6].UpToValue:= 0.2;
    Items[7].UpToValue:= 0.4;
    Items[8].UpToValue:= 0.6;

    Items[9].UpToValue:= 0.8;
  end;

Post Reply