TColorGridSeries ADDXYZ bug ?
Posted: Tue May 04, 2004 11:48 am
Hi,
I'm having a problem with TColorGridSeries ADDXYZ differences between version 5 (and 6) and 7. I'm in the process of updating to the new version, but I get some strange errors. In my example is the onclick event of a button on a form which holds a chart. In version 5 the chart is filled with values from 0 to 90 following the values but in version 7 the chart is only filled with vales from 0 to 9 follwoing the index of Z NOT the value (as you would expect).
Does anybody have any ideas how to get arround this annoying bug ? Is there a new property in version 7 I must set, or is it a bug in teechart.
-Torben/HGG
procedure TForm1.Button1Click(Sender: TObject);
var
FColorSeries : TColorGridSeries;
I : Integer;
step : Real;
begin
FColorSeries := TColorGridSeries.Create(Chart1);
FColorSeries.IrregularGrid := True;
FColorSeries.ParentChart := Chart1;
FColorSeries.Pen.Visible := False;
FColorSeries.ShowInLegend := False;
FColorSeries.UseColorRange := False;
FColorSeries.UsePalette := True;
//Add pallette
FColorSeries.Clear;
FColorSeries.ClearPalette;
FColorSeries.PaletteSteps := 10;
for I := 0 to 9 do begin
FColorSeries.AddPalette(I*10, RGB(255-I*10, 255-I*20, I*10));
end;
Chart1.BottomAxis.SetMinMax(1, 2);
Chart1.LeftAxis.SetMinMax(0, 90);
step := 10;
//Add values
for I := 0 to 9 do begin
FColorSeries.AddXYZ(1, I*step, I*step);
FColorSeries.AddXYZ(2, I*step, I*step);
end;
end;
I'm having a problem with TColorGridSeries ADDXYZ differences between version 5 (and 6) and 7. I'm in the process of updating to the new version, but I get some strange errors. In my example is the onclick event of a button on a form which holds a chart. In version 5 the chart is filled with values from 0 to 90 following the values but in version 7 the chart is only filled with vales from 0 to 9 follwoing the index of Z NOT the value (as you would expect).
Does anybody have any ideas how to get arround this annoying bug ? Is there a new property in version 7 I must set, or is it a bug in teechart.
-Torben/HGG
procedure TForm1.Button1Click(Sender: TObject);
var
FColorSeries : TColorGridSeries;
I : Integer;
step : Real;
begin
FColorSeries := TColorGridSeries.Create(Chart1);
FColorSeries.IrregularGrid := True;
FColorSeries.ParentChart := Chart1;
FColorSeries.Pen.Visible := False;
FColorSeries.ShowInLegend := False;
FColorSeries.UseColorRange := False;
FColorSeries.UsePalette := True;
//Add pallette
FColorSeries.Clear;
FColorSeries.ClearPalette;
FColorSeries.PaletteSteps := 10;
for I := 0 to 9 do begin
FColorSeries.AddPalette(I*10, RGB(255-I*10, 255-I*20, I*10));
end;
Chart1.BottomAxis.SetMinMax(1, 2);
Chart1.LeftAxis.SetMinMax(0, 90);
step := 10;
//Add values
for I := 0 to 9 do begin
FColorSeries.AddXYZ(1, I*step, I*step);
FColorSeries.AddXYZ(2, I*step, I*step);
end;
end;