CalcBarBounds behavior changed?
Posted: Wed Sep 30, 2009 6:31 pm
I had some code that was working correctly in TeeChart 7 Standard to identify which point on a TBarSeries the cursor is hovering over.
That code is no longer working now that I've upgraded to TeeChart 8 Pro. Now, whenever I call CalcBarBounds, the BarBounds rectangle
always reflects the bounds of the last point in the series, not the point whose index was passed to CalcBarBounds. Has this functionality
changed?
That code is no longer working now that I've upgraded to TeeChart 8 Pro. Now, whenever I call CalcBarBounds, the BarBounds rectangle
always reflects the bounds of the last point in the series, not the point whose index was passed to CalcBarBounds. Has this functionality
changed?
Code: Select all
void __fastcall TTestChartForm::CentroidDataChartMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
TPoint MousePosition(X, Y);
for (CurrentIndex = 0; CurrentIndex < CentroidData->Count(); CurrentIndex++)
{
CentroidData->CalcBarBounds(CurrentIndex);
if (CentroidData->BarBounds.Contains(MousePosition))
{
break;
}
}
if (CurrentIndex == CentroidData->Count())
{
CentroidData->ValueColor[CurrentIndex] = clRed;
}
}