SChartCrosshair

@protocol SChartCrosshair <NSObject>

The chart’s crosshair interface - the chart will push ‘show’, ‘move’ and ‘hide’ events onto the crosshair, which should respond appropriately.

  • Instructs the crosshair to show itself in the chart at pointInChart, which is in the chart’s coordinate space.

    This method is called each time the chart wishes to make the crosshair visible, and is paired with a -hide call.

    Declaration

    Objective-C

    - (void)showAtPoint:(CGPoint)pointInChart inChart:(nonnull ShinobiChart *)chart;

    Swift

    func show(atPoint pointInChart: Any!, in chart: ShinobiChart)
  • Instructs the crosshair to move itself in chart to the position pointInChart, in the chart’s coordinate space.

    This method is called every for frame of the crosshair’s movement, when the chart wishes to update the crosshair.

    Declaration

    Objective-C

    - (void)moveToPoint:(CGPoint)pointInChart inChart:(nonnull ShinobiChart *)chart;

    Swift

    func move(toPoint pointInChart: Any!, in chart: ShinobiChart)
  • Instructs the crosshair to hide itself from view (and usually to removeFromSuperview)

    This method is called by the chart when the crosshair should be dismissed, paired with the showAtPoint:inChart: call.

    Declaration

    Objective-C

    - (void)hide;

    Swift

    func hide()
  • Returns a BOOL representing whether the crosshair is hidden.

    Declaration

    Objective-C

    - (BOOL)isHidden;

    Swift

    func isHidden() -> Bool