Calm motion: animations on this site only fade, with no movement
Radial bar
Rings that fill to a share, one ring for each goal
Shows how far each goal is, as rings in one circle. Each ring fills to the share of its goal. For one value with a needle, use the gauge. For parts of one whole, use the donut chart.
Basic
- Episodes published75% · 3 / 4
- Social clips75% · 9 / 12
- Guest calls100% · 5 / 5
- Newsletter50% · 0.5 / 1
vue
<template>
<BlessRadialBar :data="goals" label="Goals this week" />
</template>
<script setup lang="ts">
import { BlessRadialBar } from "blessing-ui";
// the goals of a podcast team for one week
const goals = [
{ label: "Episodes published", value: 3, max: 4 },
{ label: "Social clips", value: 9, max: 12 },
{ label: "Guest calls", value: 5, max: 5 },
{ label: "Newsletter", value: 0.5, max: 1 },
];
</script>datais a list of goals. Each goal has alabel, avalue, an optionalmax(default 100), and an optionalcolor. The first goal is the outer ring.- A ring stops at full. If a value is more than its max, the legend still shows the real value.
- The circle has room for four rings. If the list is longer, the legend shows all goals, but the circle draws only the first four.
- The legend shows the name, the share, the value, and the max of each goal.
formatsets the text of a value, andsizesets the width of the circle in pixels (default 180). - For screen readers, the circle is hidden and the legend is a list.
labelnames the chart.
Usage
ts
import { BlessRadialBar } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | BlessRadialBarItem[] | — | one ring for each item, from the outside in |
size | number | 180 | the width of the circle in pixels |
format | ((v: number) => string) | — | text for one value, for example `(v) => v + " min"` |
label | string | "Chart" | names the chart for screen readers |