Page 1 of 1

Clicked(X,Y) and ColorGrid series

Posted: Tue Jun 06, 2006 11:13 am
by 9238997
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

Posted: Thu Jun 08, 2006 8:42 am
by Pep
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 ?

Posted: Thu Jun 08, 2006 1:41 pm
by 9238997
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

Posted: Fri Jun 09, 2006 9:56 am
by Pep
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.