TAChart: Fix location of DataPointCrosshairTool cursor at perimeter of bubbles of TBubbleSeries.

git-svn-id: trunk@54316 -
This commit is contained in:
wp 2017-02-28 22:21:14 +00:00
parent 3f057d8f9e
commit b20170706a

View File

@ -619,14 +619,14 @@ begin
if (AResults.FYIndex = 0) then
exit;
if Result and (nptPoint in AParams.FTargets) and (nptPoint in ToolTargets) then
if Result and (nptYList in AParams.FTargets) and (nptYList in ToolTargets) then
if (AResults.FYIndex = 1) then begin
item := Source[AResults.FIndex];
GetBubbleRect(item, iRect);
rx := (iRect.Right - iRect.Left) div 2;
ry := (iRect.Bottom - iRect.Top) div 2;
p := ParentChart.GraphToImage(AxisToGraph(item^.Point));
phi := -arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
phi := arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
SinCos(phi, sinphi, cosphi);
AResults.FImg := p + Point(round(rx * cosPhi), round(ry * sinPhi));
exit;