I have a tcolourgrid, not 3D mode, x is 1 to 15, z is 1 to 300, y varies between 2.0 and 12.0. I'd like to assign my own colour palette to values of y in bands - col1=2.0 to 3.0, col2=3.0 to 4.0 etc. Can someone give me an oindication how to do this please, user needs to be able to edit the palette and apply updated colours to the grid.
cheers
Sean.
colourgrid palette
Hi, Sean.
Yes, this can be done by adding custom palette levels to internal palette color array. There is an example of this (for NET version, but the same approach can be used in VCL) available here.
Yes, this can be done by adding custom palette levels to internal palette color array. There is an example of this (for NET version, but the same approach can be used in VCL) available here.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Is there a bug in the way this is handled?
The last two colours of the palette always take on the same colour for me. Try this
series1.PaletteSteps:=7;
series1.ClearPalette();
series1.AddPalette(4,Clnavy);
series1.AddPalette(5,Clblue);
series1.AddPalette(6,Claqua);
series1.AddPalette(7,Clyellow);
series1.AddPalette(8,Cllime);
series1.AddPalette(9,Clgreen);
series1.AddPalette(10,Clred);
series1.UseColorRange:=false;
series1.UsePalette:=true;
Chart1.Refresh();
the palette in the legend gets shunted along 1 position, ie clnavy never gets displayed and clred gets displayed twice. So I try forcing
series1.palette[6].color:=clwhite. 0/1 array indexing problem?
and get same thing, clwhite displayed twice.??
cheers
Sean.
The last two colours of the palette always take on the same colour for me. Try this
series1.PaletteSteps:=7;
series1.ClearPalette();
series1.AddPalette(4,Clnavy);
series1.AddPalette(5,Clblue);
series1.AddPalette(6,Claqua);
series1.AddPalette(7,Clyellow);
series1.AddPalette(8,Cllime);
series1.AddPalette(9,Clgreen);
series1.AddPalette(10,Clred);
series1.UseColorRange:=false;
series1.UsePalette:=true;
Chart1.Refresh();
the palette in the legend gets shunted along 1 position, ie clnavy never gets displayed and clred gets displayed twice. So I try forcing
series1.palette[6].color:=clwhite. 0/1 array indexing problem?
and get same thing, clwhite displayed twice.??
cheers
Sean.