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;
}
}