Charts
Donut chart
A pie with its middle given back: the same part-to-whole reading, plus room for the total the slices add up to.
import { EcoDonutChart } from "vue-ecosphere"
Donut with a total
The centre figure takes --font-num like every other number, and it is never a decoration.
Requests by outcome
August
Replied38%
Awaiting review24%
Closed19%
Blocked12%
Draft7%
One ratio
Pick the donut over a meter when the remainder matters as much as the used part; the remainder takes s-rest.
Plan usage
Resets on the 1st
Used360
Remaining140
API
| Name | Type | Default | Description |
|---|---|---|---|
data | ChartSlice[] | — | Label, value and optional slot per slice (six at most). |
total | string | number | the sum | The figure in the hole (donut__n): the total, or the one ratio the ring is about. |
centerLabel | string | — | The small caps line under it (donut__l). |
size | number | 220 | viewBox size. |
sort | boolean | true | Largest first, clockwise from twelve o'clock. |
legendValue | "percent" | "value" | "percent" | The number beside each legend label. |
valueFormat | (v: number) => string | — | Formats values and the default total. |
title / subtitle / caption / ariaLabel | string | — | Head and the svg label. |
emptyTitle / emptyText | string | — | chart__empty when nothing has a value. |