---
title: "init(xStart:xEnd:y:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/areamark/init(xstart:xend:y:)"
---

# init(xStart:xEnd:y:)

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

## Declaration

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

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

If you want to plot values that have a vertical interval, use init(x:yStart:yEnd:) instead.

## See Also

### Creating a range area chart

- [init(x:yStart:yEnd:)](charts/areamark/init(x:ystart:yend:).md)
- [init(x:yStart:yEnd:series:)](charts/areamark/init(x:ystart:yend:series:).md)
- [init(xStart:xEnd:y:series:)](charts/areamark/init(xstart:xend:y:series:).md)
