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

# init(xStart:xEnd:y:series:)

Creates an area mark that plots values with a horizontal interval
and associates it with the specified series.

```
nonisolated init<X, Y, S>(xStart: PlottableValue<X>, xEnd: PlottableValue<X>, y: PlottableValue<Y>, series: PlottableValue<S>) where X : Plottable, Y : Plottable, S : 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.

`series`

A series to associate the mark with.

## Discussion

The initializer behaves like [`init(xStart:xEnd:y:)`](/documentation/Charts/AreaMark/init(xStart:xEnd:y:)), except that
you can indicate which region each interval belongs to by providing
a value for the `series` input. This enables you to plot more than
one region on a single chart.

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