LabelParameters
public struct LabelParameters
Represents the properties of a grid’s line labels. Labels can only be placed near serifs.
-
The sequnce of the text labels to draw.
Declaration
Swift
public var sequence: AnySequence<String> -
The font of labels.
Declaration
Swift
public var font: Font -
The font size of labels.
Declaration
Swift
public var fontSize: Float -
The color of labels.
Declaration
Swift
public var fontColor: Color -
The nubmber of major lines per one label. Must be positive.
Declaration
Swift
public var frequency: Int -
Normally labels are placed in such a way that a major line goes through the center of a label, and the bounding box of a label touches the bound of the grid, but you can specify an offset.
Declaration
Swift
public var offset: Vector -
Normally the sequence of labels is drawn from left to right (bottom to top). Setting this property to
truecauses the sequence to be drawn from right to left (top to bottom).Declaration
Swift
public var reversed: Bool -
Creates a new label parameter set.
Declaration
Parameters
sequenceThe sequnce of the text labels to draw.
fontThe font of labels. Default is Helvetica.
fontSizeThe font size of labels. Default value is 5.
fontColorThe color of labels. Default is 50% gray.
frequencyThe nubmber of major lines per one label. Default value is 5. Must be positive.
offsetThe offset of the label. Default value is
.zero.reversedThe order in which to draw the labels. Default is
false.
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Complexity
O(N), where N is the number of elements of a shorter label sequence.
Declaration
Parameters
lhsA value to compare.
rhsAnother value to compare.
View on GitHub
LabelParameters Structure Reference