---
title: "greedy(priority:minimumSpacing:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/axisvaluelabelcollisionresolution/greedy(priority:minimumspacing:)"
---

# greedy(priority:minimumSpacing:)

Use a greedy algorithm. Display a label if it’s not overlapping with other labels.

## Declaration

```swift
static func greedy(priority: Double = 0, minimumSpacing: CGFloat? = nil) -> AxisValueLabelCollisionResolution
```

## Parameters

- `priority`: The priority of the label. A label with higher priority will get placed first by the greedy algorithm.
- `minimumSpacing`: The minimum spacing between the label and its adjacent labels.
