A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
Use a greedy algorithm. Display a label if it's not overlapping with other labels.
- Parameter priority: The priority of the label. A label with higher priority will get placed first by the greedy algorithm.
- Parameter minimumSpacing: The minimum spacing between the label and its adjacent labels.
get · iOS 16.0+
greedy
TypeScript
static get greedy(): AxisValueLabelCollisionResolution
Swift declaration
static var greedy: AxisValueLabelCollisionResolution { get }
Use a greedy algorithm. Display a label if it's not overlapping with other labels.
get · iOS 16.0+
disabled
TypeScript
static get disabled(): AxisValueLabelCollisionResolution
Swift declaration
static var disabled: AxisValueLabelCollisionResolution { get }
Do not apply collision resolution to this label. The label will always be displayed.
get · iOS 16.0+
truncate
TypeScript
static get truncate(): AxisValueLabelCollisionResolution
Swift declaration
static var truncate: AxisValueLabelCollisionResolution { get }
Truncate a label to the space available to it.
get · iOS 16.0+
automatic
TypeScript
static get automatic(): AxisValueLabelCollisionResolution
Swift declaration
static var automatic: AxisValueLabelCollisionResolution { get }
Automatically determine the prevention method based on axis type and data.