Color Grid map

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mario
Newbie
Newbie
Posts: 4
Joined: Tue Jan 18, 2005 5:00 am

Color Grid map

Post by Mario » Tue Jan 25, 2005 9:12 am

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??

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Jan 27, 2005 7:04 am

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;
Marjan Slatinek,
http://www.steema.com

Post Reply