init(x:y:series:stacking:)
Creates an area mark and associates it with the specified series.
Declaration
nonisolated init<X, Y, S>(x: PlottableValue<X>, y: PlottableValue<Y>, series: PlottableValue<S>, stacking: MarkStackingMethod = .standard) where X : Plottable, Y : Plottable, S : PlottableParameters
- 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 Standard.
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.