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:(NSColor *)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:(NSColor *)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

  shouldJumpToClick

Flag determining if the crosshair should move to the click wherever the click location is. The default value is NO.
If this flag is YES, all the clicks 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 shouldJumpToClick

Declared In

NChartCrosshair.h

  image

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

@property (nonatomic, strong) NSImage *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

  delegate

Crosshair delegate.

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

Declared In

NChartCrosshair.h