init(centered:anchor:multiLabelAlignment:collisionResolution:offsetsMarks:orientation:horizontalSpacing:verticalSpacing:content:)
Constructs an axis value label with the given properties to display the given content.
Declaration
nonisolated init(centered: Bool? = nil, anchor: UnitPoint? = nil, multiLabelAlignment: Alignment? = nil, collisionResolution: AxisValueLabelCollisionResolution = .automatic, offsetsMarks: Bool? = nil, orientation: AxisValueLabelOrientation = .automatic, horizontalSpacing: CGFloat? = nil, verticalSpacing: CGFloat? = nil, @ViewBuilder content: () -> Content)Parameters
- centered:
Whether to center the label between two axis values. If
nil, default to true for discrete data, false to continuous data. - anchor:
The anchor point on the bounding box of the text element that attaches to the
position. - multiLabelAlignment:
How labels along the axis are aligned with each other.
- collisionResolution:
How labels that collide with others are resolved.
- offsetsMarks:
Whether to offset marks to accomodate for the space used by the label.
- orientation:
The orientation of the label.
- horizontalSpacing:
The horizontal spacing of the label. If
nil, a default spacing will be used. - verticalSpacing:
The vertical spacing of the label.
- content:
The label content.