ColorGrid with Irregular Grid

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

ColorGrid with Irregular Grid

Post by jenb » Fri Jul 20, 2007 1:35 pm

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.

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Jul 23, 2007 9:42 am

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?
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Post by jenb » Mon Jul 23, 2007 9:54 am

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.

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Jul 23, 2007 10:55 am

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?
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Post by jenb » Mon Jul 23, 2007 12:03 pm

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!

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 24, 2007 9:24 am

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply