Hello TChart Team,
There is a problem/bug since the latest version of TChart VCL, with the Display of 3DGridSeries when "UsePalette" is set/used.
Everything is displayed in just ONE color and the Legend just shows Zeros.
When I then go into the Chart dialog and Set "UsePaletteMin / Auto" to TRUE :
Its starts to get "normal":
Note that we do all Chart operation in code and when I set "UsePaletteMin" to True for the 3DGridSeries in Code, that
doesn't help, we still get the ONE Color Chart and zeros in the Legend. Only when I open the TChart Editor Dialog things get correctly updated. Is this bug known and fixed already?
Thanks and best regards,
Thomas
Palette Update Problem
Re: Palette Update Problem
I just found out that I can fix this problem by calling "CreateDefaultPalette()" After populating TSurfaceSeries or TColorGridSeries.
That call was not required in previous versions of TChart VCL.
That call was not required in previous versions of TChart VCL.
Re: Palette Update Problem
Hello,
When the chart is being drawn, the
This simple example seems to correctly initialize the palette for me here:
Do you see if I'm missing anything here?
When the chart is being drawn, the
CheckPaletteEmpty
method should be called, which calls CreateDefaultPalette
in these conditions:Code: Select all
// Default palette should be re-created when: series has data, and
// when palette is empty or "dirty" and not custom.
Procedure TCustom3DPaletteSeries.CheckPaletteEmpty;
begin
if (Count>0) and ( (Length(FPalette)=0) or (IDirtyPalette and (not ICustomPalette))) then
CreateDefaultPalette;
end;
Code: Select all
uses Chart, TeeSurfa;
var Chart1: TChart;
procedure TForm1.FormCreate(Sender: TObject);
var x, z: Integer;
begin
Chart1:=TChart.Create(Self);
with Chart1 do
begin
Parent:=Self;
Align:=alClient;
Color:=clWhite;
Gradient.Visible:=False;
Walls.Back.Color:=clWhite;
Walls.Back.Gradient.Visible:=False;
View3DOptions.Orthogonal:=False;
Chart3DPercent:=100;
Aspect.Zoom:=75;
with TSurfaceSeries(AddSeries(TSurfaceSeries)) do
begin
UseColorRange:=False;
UsePalette:=True;
for x:=0 to 9 do
for z:=0 to 9 do
AddXYZ(x, x+z, z);
end;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |