Page 1 of 1
Want to know the series type for my requirement.
Posted: Wed Dec 28, 2011 1:08 pm
by 15659467
Hi Steema Support,
We are exploring TeeChart .NET 2010 to draw a graph. In this graph there is huge data (near about 100000) to be plotted however we will try to resample the data. The Data we have can be explained as follows:
We have X, Y and Z double values. We have to draw on a point created by X and Y. As far as Z is concern we have to put color according to Z value on respective point.
We are little bit confused about which series should we use for this requirement. Currently we are exploring ColorGrid for this.
Any suggestion will be highly appreciated.
Thanks and Regards
Planoresearch
Re: Want to know the series type for my requirement.
Posted: Thu Dec 29, 2011 10:13 am
by 10050769
Hello Planoresearch,
Ok. I have made a simple project where I have assigned a determinate color to determinate range of z values. Can you tell us if next code works as you want?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.ColorGrid colorGrid1;
Steema.TeeChart.Tools.GridTranspose gridTranspose1;
Steema.TeeChart.ChartController chartController1;
private void InitializeChart()
{
chartController1 = new ChartController();
this.Controls.Add(chartController1);
chartController1.Chart = tChart1;
colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
gridTranspose1 = new Steema.TeeChart.Tools.GridTranspose(tChart1.Chart);
colorGrid1.IrregularGrid = true;
double y;
for (int x = 0; x < 20; x++)
for (int z = 0; z < 30; z++)
{
y = 0.5 * Math.Pow(Math.Cos(x * 0.25), 2) +
Math.Pow(Math.Cos(z / 15.0), 2) -
Math.Cos(z / 15.0);
if (z>=0 && z<5)
{
this.colorGrid1.Add(x, y, z,Color.Aquamarine);
}
else if (z >=5 && z < 10)
{
this.colorGrid1.Add(x, y, z, Color.Aqua);
}
else if (z >=10 && z< 15)
{
this.colorGrid1.Add(x, y, z, Color.DarkCyan);
}
else if( z>=15 && z<20)
{
this.colorGrid1.Add(x, y, z, Color.Blue);
}
else if (z >= 20 && z < 25)
{
this.colorGrid1.Add(x, y, z, Color.DarkTurquoise);
}
else
{
this.colorGrid1.Add(x, y, z, Color.LightBlue);
}
}
colorGrid1.Pen.Color = Color.LightBlue;
tChart1.Axes.Depth.Visible = true;
tChart1.Legend.Visible = false;
colorGrid1.UseColorRange = false;
colorGrid1.UsePalette = false;
}
I hope will helps.
Thank,
Re: Want to know the series type for my requirement.
Posted: Thu Dec 29, 2011 2:03 pm
by 15659467
Hi Sandra,
Thanks for quick reply and code you provided. After look into your code it seems, for our requirement ColorGrid will be best option.
We will try to explore ColorGrid and tell you if any problem comes.
Once again.......Thanks
Thanks & Regards
Planoresearch
Re: Want to know the series type for my requirement.
Posted: Fri Dec 30, 2011 10:33 am
by 15659467
Hi Sandra,
We are facing some problem while implementing ColorGrid in our project. We are putting our data which is in a text file in a format as shown in following figure.
- 2011-12-30_155217.png (28.34 KiB) Viewed 6501 times
We are putting this data into color grid but we are getting some exception, which we are unable to resolve as we could not find the reason why it is coming. We are attaching sample project by which you can understand what we are trying to do. Is there some data related issue or any thing else?
Please help us. Thanks in Advance.
Thanks & Regards
Planoresearch
Re: Want to know the series type for my requirement.
Posted: Tue Jan 03, 2012 9:09 am
by 10050769
Hello
Sorry for the delay. I can reproduce your problem using last version of TeeChart.Net and we have added request in bug list report with number[TF02015988]. We will try to fix it for next maintenance release of TeeChart.Net. On the other hand, if you want you can change the property IrreguralrGrid=false. I think is not a optimal solution for you, because some values don't appear in your grid, so in your case is necessary use IrregularGrid=true for the reasons explain in this
link, but it allow you work with your project at the moment.
Thanks,