NChartCrosshair Class Reference

Inherits from NChartObject : NSObject
Declared in NChartCrosshair.h

Overview

The NChartCrosshair class provides methods to control crosshairs - lines that are perpendicular to the axes and are to mark some position on the chart. Single chart can have multiple crosshairs either connected to the chart points or free (with user defined coordinates).

+ crosshair

Create crosshair.

+ (NChartCrosshair *)crosshair

Return Value

new instance of crosshair.

Declared In

NChartCrosshair.h

+ crosshairWithColor:thickness:andTargetPoint:

Create crosshair with color, thickness and target point.

+ (NChartCrosshair *)crosshairWithColor:(UIColor *)color thickness:(float)thickness andTargetPoint:(NChartPoint *)targetPoint

Parameters

color
  • color of the crosshair.
thickness
  • thickness of the crosshair.
targetPoint
  • tracking point of the crosshair.

Return Value

new instance of crosshair.

Declared In

NChartCrosshair.h

– initWithColor:thickness:andTargetPoint:

Init crosshair with color, thickness and target point.

- (id)initWithColor:(UIColor *)color thickness:(float)thickness andTargetPoint:(NChartPoint *)targetPoint

Parameters

color
  • color of the crosshair.
thickness
  • thickness of the crosshair.
targetPoint
  • target point of the crosshair.

Return Value

initialized instance of crosshair.

Declared In

NChartCrosshair.h

  xHair

Hair for X-Axis.

@property (nonatomic, readonly) NChartHair *xHair

Declared In

NChartCrosshair.h

  yHair

Hair for Y-Axis.

@property (nonatomic, readonly) NChartHair *yHair

Declared In

NChartCrosshair.h

  zHair

Hair for Z-Axis.

@property (nonatomic, readonly) NChartHair *zHair

Declared In

NChartCrosshair.h

  targetPoint

Target point for the crosshair.
Use this property to set crosshair to track chart point. The point is not retained by the crosshair.

@property (nonatomic, weak) NChartPoint *targetPoint

Declared In

NChartCrosshair.h

  thickness

Thickness of the crosshair in pixels. The default value is 1.

@property (nonatomic, assign) float thickness

Declared In

NChartCrosshair.h

  lineDash

Dash of the crosshair.

@property (nonatomic, strong) NChartLineDash *lineDash

See Also

Declared In

NChartCrosshair.h

  shouldJumpToTouch

Flag determining if the crosshair should move to the touch wherever the touch location is. The default value is NO.
If this flag is YES, all the touches are catched by the topmost crosshair (the one that was last added to the cartesian system of the chart). So no other user interactions like pan and point selection are possible in the chart.

@property (nonatomic, assign) BOOL shouldJumpToTouch

Declared In

NChartCrosshair.h

  image

Image that is displaying in the crosshair. The default value is nil.

@property (nonatomic, strong) UIImage *image

Declared In

NChartCrosshair.h

  imageOffset

Offset in pixels of the image from the crosshair’s center. The default value is (0,0).

@property (nonatomic, assign) CGPoint imageOffset

Declared In

NChartCrosshair.h

  placeOnTop

Flag, indicating if the crosshair is placed on top of all series (YES), or beneath all series (NO).

@property (nonatomic, assign) BOOL placeOnTop

Declared In

NChartCrosshair.h

  delegate

Crosshair delegate.

@property (nonatomic, weak) id<NChartCrosshairDelegate> delegate

Declared In

NChartCrosshair.h