---
title: "init(centered:length:stroke:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/axistick/init(centered:length:stroke:)-7azpy"
---

# init(centered:length:stroke:)

Creates an axis tick with the given properties.

## Declaration

```swift
nonisolated init(centered: Bool? = nil, length: CGFloat, stroke: StrokeStyle? = nil)
```

## Parameters

- `centered`: Whether to center the grid line between two axis values.
- `length`: The length of the tick.
- `stroke`: The style of the stroke.
