for (x=0;x<1983;x=x+n)
{
for (z=0;z<987;z=z+m)
{
result=RoundTo(sin(x*Pi/180)*sin(z*Pi/180)+2,-3); //Rango de 1 a 3;
Series1->AddXYZ(x,result,z);
index=Series1->Clicked(x,z);
if (index!=-1 ) data= float(Series1->YValues->Value[index]);
data= Series1->GetXZValue(x,z);
}
}
Hello,
I’ve written this program to use the function GetXZValue to get the Y value of a TcolorGrid Serie. In this program, the index assigned is always –1 so I can’t get the correct value usuing Series1->YValues->Value[index]. And the other way was using GetXZValue but it always gives a data equal to zero. So… how could I use afterwards the values of Series1? Which function should I use?
Thank you in advance,
Getting YValues from a TColorGridSeries
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Elisabet,
Clicked method doesn't work for those series types. This is a known problem which is listed on our defect list to be fixed for future releases.
Considering the code you posted you could easily retrieve Y Values by using something like:
However, this is somewhat redundant as you already have that Y Value stored in result.
Depending on what you are trying to get you may be interested in having a look at this message where I posted an example on how you could get Y Values from some a clicked point or a drawn rectangle.
Clicked method doesn't work for those series types. This is a known problem which is listed on our defect list to be fixed for future releases.
Considering the code you posted you could easily retrieve Y Values by using something like:
Code: Select all
for (x=0;x<1983;x=x+n)
{
for (z=0;z<987;z=z+m)
{
result=RoundTo(sin(x*M_PI/180)*sin(z*M_PI/180)+2,-3); //Rango de 1 a 3;
Series1->AddXYZ(x,result,z);
data= Series1->YValues->Value[(Series1->Count())-1];
}
}
Depending on what you are trying to get you may be interested in having a look at this message where I posted an example on how you could get Y Values from some a clicked point or a drawn rectangle.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Elisabet,
Sorry Elisabet, but I've found Clicked already works fine with latest TeeChart release which is v7.05. However, it has to be used with horizontal and vertical screen pixel coordinates.Clicked method doesn't work for those series types. This is a known problem which is listed on our defect list to be fixed for future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |