Skip to content

Dither Donut Chart

Slices as dither cells with a total in the centre and a legend that lists every value and share.

On this page
Used for
  • A split of a total into three to six parts
  • Spend, traffic or runs by agent, model or source

Examples

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

data
{ key, label, value, color? }[]
One slice each. Zero and missing values are left out of the ring.
size
number
Default240
The widest the donut gets, in px.
thickness
number
Default0.34
Ring thickness as a share of the radius (0.15 to 0.7).
centerLabel / format
ReactNode / (v) => string
DefaultTotal / compact
Small text over the total, and the value format.
label
string
Names the chart for screen readers and the data table caption.
pitch
number
Default4
Cell size in CSS px. A whole number of device pixels, so it stays crisp at 1x and 2x.
Motion
-
A data change eases for 280ms (slow) with the in-out curve. The first render, a resize and reduced motion are instant.

What it handles

  1. 01Paints each slice in its own colour as dither cells with a vertical fade.
  2. 02Shows the total in the centre, or the slice you point at or reach with the arrow keys.
  3. 03Lists every value and share in a legend that also highlights a slice.
  4. 04Eases slices to new shares over 280ms.

States

Data changes
Marks ease from the old values to the new, once
280ms, in-out
Pointer or arrow key
Reads the item in a tooltip and announces it
120ms fade
Resize
Redraws at the new size, no easing
none
Reduced motion
Values jump; nothing eases
0ms

Works with

When to use

When to use

  • A split of a total into three to six parts, with the numbers in a legend.

When not to use

  • Comparing many parts: bars read faster: use Dither Bar Chart.
  • A single percentage: a progress meter reads faster: use Progress.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Dither Donut Chart to my app and wire it to my own data.
  • I need a split of a total into three to six parts, with the numbers in a legend. Set that up with the Knowns UI Dither Donut Chart.
  • Which Dither Donut Chart props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "dither-donut-chart" }) and search_docs({ query: "dither donut chart" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Dither Donut Chart, or found something off? We read every message.