Skip to content

SectorChart

Draws a pie or donut chart from SectorMark records (SwiftUI Charts).

<SectorChart ... />

Overview

Each sector is a native Arc stroke; array views other than marks are centered over the chart, typically a total inside the hole.

Topics

Properties

Name Type Required Description
innerRadius number optional Hole radius as a fraction of the outer radius (0 draws a pie).
angularInset number optional Points each sector gives up at each side, as in SwiftUI; neighbours are twice it apart.
scalable boolean optional Lays the sectors out in diameter units and scales them to fill the room the chart is given, centered.
diameter number optional With scalable, the chart's geometry in units (default 360).
accessibilityLabel string optional Summary read by VoiceOver.

Example

<SectorChart width="180" height="180" innerRadius="0.62"><SectorMark value="40" color="systemBlue" /></SectorChart>

Platform notes

  • AppKit uses the AppKit implementation. UIKit uses the UIKit implementation.

Source: lua/embedded/AppKit.lua:2306 (AppKit.SectorChart)