Contents

init(xStart:xEnd:y:series:)

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

Declaration

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:), 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:) instead.

See Also

Creating a range area chart