TContourSeries-custom Levels
Posted: Wed Apr 13, 2011 2:44 pm
Hello !
I use TeeChartPro 7 Vcl.
First I began with TColorGridSeries and figured out how to configure custom Palette-Levels. This workes fine.
Now I want to adapt this feature to contour-series. I want to reconfigure its Levels (Isoline numbers).
In the TeeChartPro demo I found following code
But this work not here in C++;
The Levels are not filled so that I cannot manipulate its UpToValues.
What the problem???
Bye
Andreas
I use TeeChartPro 7 Vcl.
First I began with TColorGridSeries and figured out how to configure custom Palette-Levels. This workes fine.
Now I want to adapt this feature to contour-series. I want to reconfigure its Levels (Isoline numbers).
In the TeeChartPro demo I found following code
Code: Select all
procedure TContourLevels.CheckBox1Click(Sender: TObject);
begin
Series1.AutomaticLevels:=not CheckBox1.Checked;
if not Series1.AutomaticLevels then AddCustomLevels;
end;
Procedure TContourLevels.AddCustomLevels;
begin
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;
end;
Code: Select all
ContourSer->AutomaticLevels=false;
ContourSer->NumLevels=10;
ContourSer->CreateAutoLevels();
int c=ContourSer->Levels->Count; ///< c ist 0 and not 10 !!!!
What the problem???
Bye
Andreas