---
title: "fit(to:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/annotationoverflowresolution/strategy/fit(to:)"
---

# fit(to:)

Fits the annotation to the given boundary, adjusting its position to ensure it doesn’t overflow.

## Declaration

```swift
static func fit(to boundary: AnnotationOverflowResolution.Boundary) -> AnnotationOverflowResolution.Strategy
```
