---
title: "unit(_:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/majorvaluealignment/unit(_:)"
---

# unit(_:)

Align to units.

## Declaration

```swift
static func unit(_ unit: Value) -> MajorValueAlignment<Value> where Value : Numeric
```

## Parameters

- `unit`: The alignment unit.
