<!--
{
  "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(xStart:xEnd:y:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts8AreaMarkV6xStart4xEnd1yAcA14PlottableValueVyxG_AiHyq_GtcAA0F0RzAaKR_r0_lufc"
  },
  "title" : "init(xStart:xEnd:y:)"
}
-->

# init(xStart:xEnd:y:)

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

```
nonisolated init<X, Y>(xStart: PlottableValue<X>, xEnd: PlottableValue<X>, y: PlottableValue<Y>) where X : Plottable, Y : Plottable
```

## Parameters

`xStart`

The starting horizontal position for the mark.

`xEnd`

The ending horizontal position for the mark.

`y`

The vertical position for the mark.

## Discussion

Use this initializer to create a range area chart with horizontal
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(
        xStart: .value("Minimum Temperature", minimumTemperature),
        xEnd: .value("Maximum Temperature", day.maximumTemperature),
        y: .value("Date", day.date)
    )
}
```

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

If you want to plot values that have a vertical interval, use
[`init(x:yStart:yEnd:)`](/documentation/Charts/AreaMark/init(x:yStart:yEnd:)) 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)