<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Charts",
  "identifier" : "/documentation/Charts/AxisMarks/init(format:preset:position:values:stroke:)-8fe1o",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts9AxisMarksV6format6preset8position6values6strokeACys5NeverOGqd___AA0B10MarkPresetVAA0bJ8PositionVAA0bJ6ValuesV7SwiftUI11StrokeStyleVSgtcAJRsz10Foundation06FormatQ0Rd__AA9Plottable0S5InputRpd__SS0S6OutputRtd__lufc"
  },
  "title" : "init(format:preset:position:values:stroke:)"
}
-->

# init(format:preset:position:values:stroke:)

Creates axis markers with the given properties, will override default markers.
Default content will be used for the axis markers.

```
nonisolated init<Format>(format: Format, preset: AxisMarkPreset = .automatic, position: AxisMarkPosition = .automatic, values: AxisMarkValues = .automatic, stroke: StrokeStyle? = nil) where Content == Never, Format : FormatStyle, Format.FormatInput : Plottable, Format.FormatOutput == String
```

## Parameters

`format`

The format to use for the labels.

`preset`

The preset of the axis markers.

`position`

The position of the axis markers.

`values`

The values of the axis markers.

`stroke`

The stroke to use for grid lines and ticks.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)