Page 1 of 1

Color Grid map

Posted: Tue Jan 25, 2005 9:12 am
by 9340642
Hi,

I need to design a grid a colored cells but Color Grid map dosen't work well!!

Infact with the following code it (correctly) produces a map of 4 cells centered in (1,1), (2,1), (1,2), (2,2):

TColorGridSeries1->AddXYZ(1,1,1);
TColorGridSeries1->AddXYZ(2,2,1);
TColorGridSeries1->AddXYZ(1,3,2);
TColorGridSeries1->AddXYZ(2,4,2);


but when i use floating numbers it dosen't generate, as it would, a map of 4 cells centered in (1.5,1), (2.5,1), (1.5,2), (2.5,2):


TColorGridSeries1->AddXYZ(1.5,1,1);
TColorGridSeries1->AddXYZ(2.5,2,1);
TColorGridSeries1->AddXYZ(1.5,3,2);
TColorGridSeries1->AddXYZ(2.5,4,2);

How can I solve this problem??

Posted: Thu Jan 27, 2005 7:04 am
by Marjan
Hi.
but when i use floating numbers it dosen't generate, as it would
Yes, we're aware of this problem. Actually, setting the TColorGridSeries.IrregularGrid to true should fix the problem, but right now only cell boundaries are drawn correctly and background bitmap is not. The problem is in internal drawing routine and how bitmap is constructed (you cannot individually stretch bitmap pixels, you can resize only complete bitmap). For the time being the only good workaround for this case (when cells are not equal) is to use TSurfaceSeries with these settings:

Code: Select all

With Chart1 do
begin
    Chart3DPercent := 90;
    DepthTopAxis.Visible := True;
    View3DOptions.Elevation = 270;
    View3DOptions.Orthogonal = False;
    View3DOptions.Perspective = 0;
    View3DOptions.Rotation = 360;
    View3DOptions.Zoom = 100;
end;