<!--
{
  "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/AreaMark/init(x:yStart:yEnd:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts8AreaMarkV1x6yStart4yEndAcA14PlottableValueVyxG_AHyq_GAJtcAA0F0RzAaKR_r0_lufc"
  },
  "title" : "init(x:yStart:yEnd:)"
}
-->

# init(x:yStart:yEnd:)

Creates an area mark that plots values with a vertical interval.

```
nonisolated init<X, Y>(x: PlottableValue<X>, yStart: PlottableValue<Y>, yEnd: PlottableValue<Y>) where X : Plottable, Y : Plottable
```

## Parameters

`x`

The horizontal position for the mark.

`yStart`

The starting vertical position for the mark.

`yEnd`

The ending vertical position for the mark.

## Discussion

Use this initializer to create a range area chart with vertical
intervals. For example you can create a region that encompasses all
the temperatures over the course of a day, across a number of days:

```
Chart(data) { day in
    AreaMark(
        x: .value("Date", day.date),
        yStart: .value("Minimum Temperature", minimumTemperature),
        yEnd: .value("Maximum Temperature", day.maximumTemperature)
    )
}
```

![A chart that shows month names on the x-axis, ranging from January to October, and a number in the range 0 to 80 on the y-axis. A solid blue region spans the chart from left to right. The region is close to the middle of the y-axis on either end, and closer to the top of the chart in the middle. The region is thinner at the ends and thicker in the middle.](images/com.apple.Charts/AreaMark-5-macOS@2x.png)

If you want to plot values that have a horiztonal interval, use
[`init(xStart:xEnd:y:)`](/documentation/Charts/AreaMark/init(xStart:xEnd:y:)) instead.

---

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)