Page 1 of 1

ColorGrid - Clicked() function returns -1

Posted: Wed Jan 06, 2010 2:56 pm
by 13050364
Hi Support

Im using a Contour as the DataSource to a ColorGrid

On a mouse click I get the index to the underlying series doing this.

Point p = myColorGrid.ValuePointToScreenPoint(myCursor.XValue, myCursor.YValue);
int index = myColorGrid.Clicked(p);

As long as index >= 0 then everything is fine and I can access the series data.

However when I click at the very top (maximumm y axis extent) of the colorgrid (lets say y = 100)) index is returning -1.
I know the data for y=100 is there because the Steema Editor shows the Series data. So why cant I get a valid index returned.
Everything works fine for a mouse-click for y < 100 just not for y = 100. Its as though y=100 is not being displayed on the chart when I think it is.

Any ideas whats going wrong?

Thanks

Re: ColorGrid - Clicked() function returns -1

Posted: Thu Jan 07, 2010 2:45 pm
by narcis
Hi Dave,

First of all please notice that such series need to be populated as I described here. Having said that, when IrregularGrid=false, ColorGrid series is painted as a typical grid, one column and row for each X and Z values, as an Excel grid would be. When IrregularGrid=true one column and row are suppressed to be able to plot a grid-like structure. Is that your case?

If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here and let us know the TeeChart version you are using.

Thanks in advance.

Re: ColorGrid - Clicked() function returns -1

Posted: Fri Jan 08, 2010 10:47 am
by 13050364
Hi Narcis

Thanks. I think its making sense now. When I click the top of the colorgrid (at the maxm Y [or should that be Z!] extent on the chart) Im not clicking on a grid cell as such. Im just clicking on a point. There is no grid cell associated with my mouse click because Im at the top of the chart. I suppose the way round this is to increase the Y-extent of the chart but I dont want to do this. Im not sure if there is an easy solution.

Re: ColorGrid - Clicked() function returns -1

Posted: Mon Jan 11, 2010 9:00 am
by yeray
Hi Dave,

Please, try to arrange a simple example project we can run as-is, explaining the steps we should follow if necessary, to reproduce the problem here. This would help us to understand the exact situation.

Thanks in advance.