Charts / Donut chart

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

Replied: 38 (38%)Awaiting review: 24 (24%)Closed: 19 (19%)Blocked: 12 (12%)Draft: 7 (7%)
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

Used: 360 (72%)Remaining: 140 (28%)
Used360
Remaining140

API

NameTypeDefaultDescription
dataChartSlice[]—Label, value and optional slot per slice (six at most).
totalstring | numberthe sumThe figure in the hole (donut__n): the total, or the one ratio the ring is about.
centerLabelstring—The small caps line under it (donut__l).
sizenumber220viewBox size.
sortbooleantrueLargest 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 / ariaLabelstring—Head and the svg label.
emptyTitle / emptyTextstring—chart__empty when nothing has a value.