iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
ISCINearestPointProvider
@protocol ISCINearestPointProvider <ISCIAttachable>
Defines the interface with method for search of nearest point.
-
Performs search of nearest point in 2D.
Declaration
Objective-C
- (void)setNearestPoint2D:(nonnull SCIHitTestInfo *)hitTestResult x:(float)x y:(float)y hitTestRadius:(float)hitTestRadius;
Swift
func setNearestPoint2D(_ hitTestResult: SCIHitTestInfo, x: Float, y: Float, hitTestRadius: Float)
Parameters
hitTestResult
The
hit-test
info to update.x
The
x coordinate
ofhit-test
in pixels.y
The
y coordinate
ofhit-test
in pixels.hitTestRadius
The
hit-test
radius in pixels. -
Performs search of nearest point in x direction only.
Declaration
Objective-C
- (void)setNearestHorizontalPointResult:(nonnull SCIHitTestInfo *)hitTestResult x:(float)x y:(float)y;
Swift
func setNearestHorizontalPointResult(_ hitTestResult: SCIHitTestInfo, x: Float, y: Float)
Parameters
hitTestResult
The hit test info to update.
x
The
x coordinate
ofhit-test
in pixels.y
The
y coordinate
ofhit-test
in pixel.