iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIMultiPointLabel
@interface SCIMultiPointLabel : NSObject
Defines a label drawn by a multi-point trading annotation.
Note
text is the complete label string. For text which has to change as the annotation is
edited, use the annotation’s formatLabel block instead - it takes precedence over text.
-
Defines the static text of this label.
Note
Ignored when the annotation’sformatLabelreturns a non-empty string, and whenanchorModeisSCIMultiPointLabelAnchorMode_Axis.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *text;Swift
var text: String? { get set } -
Defines what this label is anchored to. Defaults to
SCIMultiPointLabelAnchorMode_Point.Declaration
Objective-C
@property (nonatomic) SCIMultiPointLabelAnchorMode anchorMode;Swift
var anchorMode: SCIMultiPointLabelAnchorMode { get set } -
Defines the index of the base point this label is anchored to, when
anchorModeisSCIMultiPointLabelAnchorMode_Point. Defaults to 0.Declaration
Objective-C
@property (nonatomic) NSInteger pointIndex;Swift
var pointIndex: Int { get set } -
Defines the index of the base point the anchor segment starts at. Defaults to 0.
Declaration
Objective-C
@property (nonatomic) NSInteger segmentStartIndex;Swift
var segmentStartIndex: Int { get set } -
Defines the index of the base point the anchor segment ends at.
Note
Defaults to -1, meaningsegmentStartIndex + 1. Values below that are coerced up to it.Declaration
Objective-C
@property (nonatomic) NSInteger segmentEndIndex;Swift
var segmentEndIndex: Int { get set } -
Defines where along the anchor segment the label sits, as a fraction. Defaults to 0.5.
Note
Not clamped - values outside 0.0 - 1.0 place the label beyond the segment.Declaration
Objective-C
@property (nonatomic) double segmentRatio;Swift
var segmentRatio: Double { get set } -
Defines how a segment-anchored label is rotated. Defaults to
SCISegmentLabelRotationMode_Parallel.Declaration
Objective-C
@property (nonatomic) SCISegmentLabelRotationMode segmentLabelRotationMode;Swift
var segmentLabelRotationMode: SCISegmentLabelRotationMode { get set } -
Defines which axes this label is drawn on when
anchorModeisSCIMultiPointLabelAnchorMode_Axis. Defaults toSCIAxisLabelDrawMode_Y.Declaration
Objective-C
@property (nonatomic) SCIAxisLabelDrawMode axisLabelDrawMode;Swift
var axisLabelDrawMode: SCIAxisLabelDrawMode { get set } -
Defines the
SCIFontStyleof this label.Note
Whennil, the annotation supplies a font in the colour of the zone.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIFontStyle *fontStyle;Swift
var fontStyle: SCIFontStyle? { get set } -
Defines the text alignment within this label.
Declaration
Objective-C
@property (nonatomic) SCIAlignment alignment;Swift
var alignment: SCIAlignment { get set } -
Defines how this label is placed horizontally relative to its anchor.
Declaration
Objective-C
@property (nonatomic) SCIHorizontalAnchorPoint horizontalTextPosition;Swift
var horizontalTextPosition: SCIHorizontalAnchorPoint { get set } -
Defines how this label is placed vertically relative to its anchor.
Declaration
Objective-C
@property (nonatomic) SCIVerticalAnchorPoint verticalTextPosition;Swift
var verticalTextPosition: SCIVerticalAnchorPoint { get set } -
Defines the padding inside this label.
Declaration
Objective-C
@property (nonatomic) UIEdgeInsets padding;Swift
var padding: UIEdgeInsets { get set } -
Defines an additional horizontal offset in points applied to this label.
Declaration
Objective-C
@property (nonatomic) CGFloat xOffset;Swift
var xOffset: CGFloat { get set } -
Defines an additional vertical offset in points applied to this label.
Declaration
Objective-C
@property (nonatomic) CGFloat yOffset;Swift
var yOffset: CGFloat { get set } -
Creates a label anchored to the base point at the given index.
Declaration
Objective-C
+ (nonnull instancetype)pointLabelAtIndex:(NSInteger)pointIndex;Swift
class func pointLabel(at pointIndex: Int) -> Self -
Creates a label anchored to the middle of the segment between the given base points.
Declaration
Objective-C
+ (nonnull instancetype)segmentLabelFromIndex:(NSInteger)startIndex toIndex:(NSInteger)endIndex;Swift
class func segmentLabel(from startIndex: Int, to endIndex: Int) -> Self -
Creates a label anchored to the axes at the base point with the given index.
Declaration
Objective-C
+ (nonnull instancetype)axisLabelAtIndex:(NSInteger)pointIndex drawMode:(SCIAxisLabelDrawMode)drawMode;Swift
class func axisLabel(at pointIndex: Int, drawMode: SCIAxisLabelDrawMode) -> Self
View on GitHub