RectanglePlot
Chart content that represents a collection of data using rectangles.
Declaration
struct RectanglePlot<Content>Overview
Use RectanglePlot when you want to visualize data in the same way as with RectangleMark, but you want to visualize an entire data collection with a single plot.
You can initialize and style the plot with simple values or key paths. Add modifiers with KeyPath before adding modifiers with simple values.
Chart {
RectanglePlot(
tasks,
x: .value("Time", \.startTime, \.endTime),
y: .value("Project", \.project)
)
.foregroundStyle(by: .value("Status", \.status))
.cornerRadius(4)
}Topics
Plotting rectangles from a collection
init(_:x:y:width:height:)init(_:x:yStart:yEnd:width:)init(_:x:yStart:yEnd:width:)init(_:x:yStart:yEnd:width:)init(_:xStart:xEnd:y:height:)init(_:xStart:xEnd:y:height:)init(_:xStart:xEnd:y:height:)init(_:xStart:xEnd:yStart:yEnd:)init(_:xStart:xEnd:yStart:yEnd:)init(_:xStart:xEnd:yStart:yEnd:)init(_:xStart:xEnd:yStart:yEnd:)init(_:xStart:xEnd:yStart:yEnd:)init(_:xStart:xEnd:yStart:yEnd:)