Clicked(X,Y) and ColorGrid series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Gareth
Newbie
Newbie
Posts: 6
Joined: Thu Oct 27, 2005 4:00 am
Location: UK

Clicked(X,Y) and ColorGrid series

Post by Gareth » Tue Jun 06, 2006 11:13 am

Hi

I am trying to use the Clicked(X,Y) function with a ColorGrid series with its
IrregularGrid property set to false. It always seems to return -1, except
for a small region just above the X axis, where it seems to work Ok. Is there
an issue with this function and Irregular ColorGrids?

I am using C++Builder 6 with TChart V7.07.

example code:

Code: Select all

void __fastcall TMDIChild::Chart1MouseMove(TObject *Sender,
      TShiftState Shift, int X, int Y)
{
    if(ColorGrid->Active)
    {
        int i = ColorGrid->Clicked(X,Y);
        if(i!=-1)
        {
            double Val =  ColorGrid->YValue[i];
            Chart1->Title->Text->Strings[0] = FloatToStr(Val);
        }
    }
}

Thanks

Gareth

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jun 08, 2006 8:42 am

Hi Gareth,

does the example included into the Demo Features project, under :
All Features -> Welcome ! -> Chart Styles -> Statistical -> Color Grid -> Mouse Hits, shows what you're looking for ?

Gareth
Newbie
Newbie
Posts: 6
Joined: Thu Oct 27, 2005 4:00 am
Location: UK

Post by Gareth » Thu Jun 08, 2006 1:41 pm

Hi

Sorry, what I meant to say was that the Clicked(X,Y) method does not seem to work
when the IrregularGrid property is set to true.

The example you mentioned does indeed work, but only if the IrregularGrid property is set to false, set it to true, then it no longer works.

Thanks and sorry for the confusion

Gareth

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jun 09, 2006 9:56 am

Hi Gareth,

yes, this feature si not yet available in the latest Teechart Pro version. It's on our wish list to be considered for further releases.

Post Reply