---
title: "init(x:y:series:stacking:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/areamark/init(x:y:series:stacking:)"
---

# init(x:y:series:stacking:)

Creates an area mark and associates it with the specified series.

## Declaration

```swift
nonisolated init<X, Y, S>(x: PlottableValue<X>, y: PlottableValue<Y>, series: PlottableValue<S>, stacking: MarkStackingMethod = .standard) where X : Plottable, Y : Plottable, S : Plottable
```

## Parameters

- `x`: The horizontal position for the mark.
- `y`: The vertical position for the mark.
- `series`: A series to associate the mark with.
- `stacking`: The way in which the chart stacks area regions. The default is doc://com.apple.Charts/documentation/Charts/MarkStackingMethod/standard.

## Discussion

Discussion The initializer behaves like init(x:y:stacking:), except that you can indicate which region each data point belongs to by providing a value for the series input. This enables you to plot more than one region on a single chart.

## See Also

### Creating an area mark

- [init(x:y:stacking:)](charts/areamark/init(x:y:stacking:).md)
