SectorPlot
Chart content that represents a collection of data using a sector of a pie or donut chart, which shows how individual categories make up a meaningful total.
Declaration
struct SectorPlot<Content>Overview
Use SectorPlot when you want to visualize data in the same way as with SectorMark, 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.
SectorPlot(
votes,
angle: .value("Vote count", \.voteCount),
angularInset: 1
)
.foregroundStyle(by: .value("Party", \.party))
.cornerRadius(4)Topics
Plotting sectors from a collection
init(_:angle:innerRadius:outerRadius:angularInset:)init(_:angle:innerRadius:outerRadius:angularInset:)