Cell Color in ColorGrid
Posted: Sat Dec 24, 2011 12:55 pm
Hi Steema Support,
We are using TeeChart for .NET2010. I am trying to create a color grid series I which we are putting data in the manner as in following code. I have put red color in each cell of grid. I am facing problem when I am trying to zoom the chart. The color of cells are changing as soon as I zoom the chart. You can see it in attached picture.
The code is:
In above code “i” represents to x ,”j” represents to y and “k” is some value which represent the z value. Currently I am putting red color to all cell later I will put color on the basis of z values.
We are using TeeChart for .NET2010. I am trying to create a color grid series I which we are putting data in the manner as in following code. I have put red color in each cell of grid. I am facing problem when I am trying to zoom the chart. The color of cells are changing as soon as I zoom the chart. You can see it in attached picture.
The code is:
Code: Select all
tChart1.Aspect.View3D = false;
tChart1.Header.Text = "";
tChart1.Walls.Visible = false;
tChart1.Chart.Panel.Color = Color.Transparent;
tChart1.Zoom.Allow = false;
tChart1.Axes.Bottom.Automatic = true;
tChart1.Axes.Bottom.AxisPen.Color = Color.Gray;
tChart1.Axes.Left.Automatic = true;
tChart1.Axes.Left.AxisPen.Color = Color.Gray;
tChart1.Zoom.Allow = true;
tChart1.Legend.Visible = true;
clrGrid = newColorGrid();
clrGrid.Pen.Color = Color.Blue;
clrGrid.UsePalette = true;
clrGrid.UseColorRange = false;
clrGrid.Pen.Visible = true;
int k = 0;
for (int i = 1539; i < 2819; i++)
{
k++;
for (int j = 0; j < 5976; j = j + 4)
{
clrGrid.Add(i,k,j, Color.Red);
}
}
tChart1.Series.Add(clrGrid);