Skip to main content
WireKit
Copy for LLM

Pie + Donut

ApexCharts spells it donut; Chart.js spells it doughnut. WireKit's public vocabulary is the Chart.js spelling — pass type="doughnut" and the adapter's mapType() renames it to donut on the way out, so the same snippet renders under either library. The rename is one-way: donut is not a value the adapter accepts on input, and passing it throws TypeNotSupportedException.

Basic Example — Traffic sources

Traffic-source breakdown (last 30 days)

Donut — Plan distribution

Active subscribers by plan tier

Monochrome variant

<x-wirekit-chart
    type="doughnut"
    :labels="['Q1', 'Q2', 'Q3', 'Q4']"
    :datasets="[['data' => [42, 58, 71, 89]]]"
    :options="[
        'theme' => ['monochrome' => ['enabled' => true, 'color' => 'var(--color-wk-accent)', 'shadeTo' => 'light']],
    ]"
/>

ApexCharts shades each slice from the supplied color towards lighter/darker tones — useful for "single brand color" dashboards where rainbow palettes feel out of place.

License note

ApexCharts is non-MIT — see the License section on the Chart overview page and apexcharts.com/license for the full terms.

See Also

Design Tokens

See ApexCharts adapter — Design Tokens for the color, typography, and grid tokens shared across every ApexCharts demo.

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store