Page 1 of 1
ColorGrid with Irregular Grid
Posted: Fri Jul 20, 2007 1:35 pm
by 13045625
I previously had a problem with the ColorGrid series - it was crashing when swapping to an irregular grid. With the latest version (from 11th July) it is not now crashing but is not showing any colors either. It just seems to show a background with a gradient at every cell.
Posted: Mon Jul 23, 2007 9:42 am
by 9348258
Hello!!
If you use a Irregular Grid, it's normal that one of Cells are trasparent, if you don't put value for it. A solution can be to put the IrregularGrid property to false, then the cells without value are the white color.
This is the behavior waited for you?
Posted: Mon Jul 23, 2007 9:54 am
by 13045625
Hi Edu
I afraid that I don't think that your reply is correct. All the cells have a value but all the cells are appearing as clear. There is no point in setting irregular grid to false because the grid is irregular in the X axis, although the X values are the same for all values of Z (hope that this is clear). This was working previously in the ActiveX version.
Posted: Mon Jul 23, 2007 10:55 am
by 9348258
Hi!
Please could you show me the code which you add the values to the ColorGrid, with the all properties that you assign to the ColorGrid?
Posted: Mon Jul 23, 2007 12:03 pm
by 13045625
hi
I posted a zipped .NET project on your upload site. The file name is simple.zip. This is the same as a project that I previously sent to Narcis when the control was crashing. The only difference is that the latest version of the control is substituted
Instructions:
Unzip everything, then compile and run the project. You will need to import the registry key simple.reg (in zip file). Use the File/Open menu item or toolbar icon then browse to the data file in the select file dialog (data file 2PA050_1.dat also in the zip - keep voltage the same). Then click on the purple chart icon in the toolbar (“Quick Plot”). The ColorGrid plot will be displayed. Then click on the green “E” button in the toolbar of the image dialog. The palette disappears and all cells appear transparent.
Sorry that despite the name of the zip file the instuctions are quite complex!
Posted: Tue Jul 24, 2007 9:24 am
by Chris
Hello,
Yes, I can confirm that in teechart.net v3 this code:
Code: Select all
private Steema.TeeChart.Styles.ColorGrid colorGrid;
private void InitializeChart()
{
double x, y, z;
Random rnd = new Random();
int length = 3;
tChart1.Aspect.View3D = false;
tChart1.Series.Add(colorGrid = new Steema.TeeChart.Styles.ColorGrid());
colorGrid.IrregularGrid = true;
for (int i = 0; i < length; i++)
{
x = i * i;
for (int j = 0; j < length; j++)
{
z = j;
y = rnd.NextDouble();
colorGrid.Add(x, y, z);
}
}
}
produces different results to this code (teechart vcl v8, on which the ax version is based):
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
colorGrid : TColorGridSeries;
x, y, z : Double;
length, i, j : Integer;
begin
colorGrid := TColorGridSeries.Create(Self);
colorGrid.ParentChart := Chart1;
length := 2;
Chart1.View3D := false;
colorGrid.IrregularGrid := true;
for i := 0 to length do
begin
x := i * i;
for j := 0 to length - 1 do
begin
z := j;
y := Random;
colorGrid.AddXYZ(x, y, z);
end;
end;
end;
I have added this issue as a high priorty defect to our bug tracking system, meaning that a fix to it will be considered for inclusion into a future maintenance release.