Contents

init(xStart:xEnd:yStart:yEnd:)

Creates a bar mark that plots values with its x interval and fixed y position.

Declaration

nonisolated init<X>(xStart: PlottableValue<X>, xEnd: PlottableValue<X>, yStart: CGFloat? = nil, yEnd: CGFloat? = nil) where X : Plottable

Parameters

  • xStart:

    The value plotted with x start.

  • xEnd:

    The value plotted with x end.

Discussion

Use this initializer to show horizontal intervals for one category:

Chart(data) {
   BarMark(
       xStart: .value("Start Time", $0.start),
       xEnd: .value("End Time", $0.end)
   )
}

[Image]

See Also

Creating a bar mark