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 *)crosshairReturn 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 *)targetPointParameters
color |
|
|---|---|
thickness |
|
targetPoint |
|
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 *)targetPointParameters
color |
|
|---|---|
thickness |
|
targetPoint |
|
Return Value
initialized instance of crosshair.
Declared In
NChartCrosshair.h
xHair
Hair for X-Axis.
@property (nonatomic, readonly) NChartHair *xHairDeclared In
NChartCrosshair.h
yHair
Hair for Y-Axis.
@property (nonatomic, readonly) NChartHair *yHairDeclared In
NChartCrosshair.h
zHair
Hair for Z-Axis.
@property (nonatomic, readonly) NChartHair *zHairDeclared 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 *targetPointDeclared In
NChartCrosshair.h
thickness
Thickness of the crosshair in pixels. The default value is 1.
@property (nonatomic, assign) float thicknessDeclared In
NChartCrosshair.h
lineDash
Dash of the crosshair.
@property (nonatomic, strong) NChartLineDash *lineDashSee 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 shouldJumpToClickDeclared In
NChartCrosshair.h
image
Image that is displaying in the crosshair. The default value is nil.
@property (nonatomic, strong) NSImage *imageDeclared 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 imageOffsetDeclared In
NChartCrosshair.h
placeOnTop
Flag, indicating if the crosshair is placed on top of all series (YES), or beneath all series (NO). The default value is YES.
@property (nonatomic, assign) BOOL placeOnTopDeclared In
NChartCrosshair.h
delegate
Crosshair delegate.
@property (nonatomic, weak) id<NChartCrosshairDelegate> delegateDeclared In
NChartCrosshair.h