PointPlot
Chart content that represents a collection of data using points.
Declaration
struct PointPlot<Content>Overview
Use PointPlot when you want to visualize data in the same way as with PointMark, 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 {
PointPlot(
flightDelays,
x: .value("Flight Distance", \.distance),
y: .value("Flight Delay", \.delay)
)
.foregroundStyle(by: .value("Airline", \.airline))
.opacity(\.opacity)
.symbolSize(by: .value("Capacity", \.passengerCount))
.symbol(.circle)
}