iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIShiftTooltipHelper

@interface SCIShiftTooltipHelper : NSObject

Helper class which used to shift tooltip placement point .

  • Calculated the point between p1 and p2.

    Declaration

    Objective-C

    + (CGPoint)getMidpointFromP1:(CGPoint)p1 p2:(CGPoint)p2;

    Swift

    class func getMidpointFromP1(_ p1: CGPoint, p2: CGPoint) -> CGPoint

    Parameters

    p1

    First point.

    p2

    Second point.

    Return Value

    The computed mid-point between p1 and p2.

  • Compute the shifted point according to passed in params.

    Declaration

    Objective-C

    + (CGPoint)getShiftedPoint:(CGPoint)point
             customPointOffset:(CGPoint)customPointOffset
               markerPlacement:(SCIPlacement)markerPlacement
                        offset:(float)offset;

    Swift

    class func getShiftedPoint(_ point: CGPoint, customPointOffset: CGPoint, markerPlacement: SCIPlacement, offset: Float) -> CGPoint

    Parameters

    point

    The original point which is going to be shifter.

    customPointOffset

    If it’s not CGPointZero - then offset will be ignored, and this custom one will be applied.

    markerPlacement

    The marker placement to be used during calculations.

    offset

    The offset which is applied in X-Y directions, according to `markerPlacement.

    Return Value

    Computed shifited point.