<!--
{
  "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(preset:position:values:stroke:)-8xkl5",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts9AxisMarksV6preset8position6values6strokeACys5NeverOGAA0B10MarkPresetV_AA0bI8PositionVSayqd__G7SwiftUI11StrokeStyleVSgtcAIRszAA9PlottableRd__lufc"
  },
  "title" : "init(preset:position:values:stroke:)"
}
-->

# init(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<Value>(preset: AxisMarkPreset = .automatic, position: AxisMarkPosition = .automatic, values: [Value], stroke: StrokeStyle? = nil) where Content == Never, Value : Plottable
```

## Parameters

`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)