ColorGrid Question - 2
Posted: Fri Feb 18, 2005 4:19 pm
In an earlier thread I mentioned this code was failing:
series1.Clear;
series1.ClearPalette();
series1.UseColorRange:=false;
series1.UsePalette:=true;
series1.PaletteSteps:=10;
series1.UsePaletteMin := false;
series1.PaletteStep := 100;
series1.PaletteMin := 0;
// For testing - in practice these will all be diff.
series1.AddPalette(100,ClAqua);
series1.AddPalette(200,ClAqua);
series1.AddPalette(300,ClAqua);
series1.AddPalette(400,ClAqua);
series1.AddPalette(500,ClAqua);
series1.AddPalette(600,Clred);
series1.AddPalette(700,Clred);
series1.AddPalette(800,Clred);
series1.AddPalette(900,Clred);
series1.AddPalette(1000, clRed);
y := 0;
for z := 0 to 60 do
for x := 0 to 85 do
begin
series1.AddXYZ(x, y, z);
y := (y + 1) mod 1001 ;
end;
I updated to 7.04 - and I have exactly the same trouble. However, if I remove these four lines:
series1.PaletteSteps:=10;
series1.UsePaletteMin := false;
series1.PaletteStep := 100;
series1.PaletteMin := 0;
as I just discovered it seems to work. I don't know why this would make a difference as AFAICT these are the same values that are set at design time - any ideas?
Regards,
Rick
series1.Clear;
series1.ClearPalette();
series1.UseColorRange:=false;
series1.UsePalette:=true;
series1.PaletteSteps:=10;
series1.UsePaletteMin := false;
series1.PaletteStep := 100;
series1.PaletteMin := 0;
// For testing - in practice these will all be diff.
series1.AddPalette(100,ClAqua);
series1.AddPalette(200,ClAqua);
series1.AddPalette(300,ClAqua);
series1.AddPalette(400,ClAqua);
series1.AddPalette(500,ClAqua);
series1.AddPalette(600,Clred);
series1.AddPalette(700,Clred);
series1.AddPalette(800,Clred);
series1.AddPalette(900,Clred);
series1.AddPalette(1000, clRed);
y := 0;
for z := 0 to 60 do
for x := 0 to 85 do
begin
series1.AddXYZ(x, y, z);
y := (y + 1) mod 1001 ;
end;
I updated to 7.04 - and I have exactly the same trouble. However, if I remove these four lines:
series1.PaletteSteps:=10;
series1.UsePaletteMin := false;
series1.PaletteStep := 100;
series1.PaletteMin := 0;
as I just discovered it seems to work. I don't know why this would make a difference as AFAICT these are the same values that are set at design time - any ideas?
Regards,
Rick