diff --git a/components/tachart/tacustomseries.pas b/components/tachart/tacustomseries.pas index 15f9dc5c60..2cf564830e 100644 --- a/components/tachart/tacustomseries.pas +++ b/components/tachart/tacustomseries.pas @@ -228,8 +228,6 @@ type procedure UpdateMinXRange; property Pointer: TSeriesPointer read FPointer write SetPointer; - property UseReticule: Boolean - read FUseReticule write SetUseReticule default false; public destructor Destroy; override; public @@ -240,6 +238,8 @@ type procedure MovePoint(var AIndex: Integer; const ANewPos: TPoint); override; property MarkPositions: TLinearMarkPositions read FMarkPositions write SetMarkPositions default lmpOutside; + property UseReticule: Boolean + read FUseReticule write SetUseReticule default false; end; implementation @@ -914,7 +914,7 @@ var dist, i: Integer; pt: TPoint; begin - Result := UseReticule and (Count > 0); + Result := Count > 0; AResults.FDist := MaxInt; for i := 0 to Count - 1 do begin // Since axis transformation may be non-linear, the distance should be diff --git a/components/tachart/tatools.pas b/components/tachart/tatools.pas index 3dc2c7a113..e85c22f084 100644 --- a/components/tachart/tatools.pas +++ b/components/tachart/tatools.pas @@ -1072,6 +1072,7 @@ begin p.FRadius := Trunc(Sqrt(MaxInt)); for s in CustomSeries(FChart) do if + (not (s is TBasicPointSeries) or TBasicPointSeries(s).UseReticule) and s.GetNearestPoint(p, cur) and PtInRect(FChart.ClipRect, cur.FImg) and (cur.FDist < best.FDist) then begin