Donut Chart
Кольцевые диаграммы. Бесплатно, MIT · Графики и аналитика › Доли и структура
Установка
npx valyro-cli@latest add donut-chart
npx shadcn@latest add https://valyro.xyz/r/donut-chart.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { DonutChart } from 'valyro-ui';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
data * | DonutSegment[] | Segments in drawing order, clockwise from the top; zero, negative and non-finite values take no space. | |
size | number | 200 | Diameter in px (shrinks to fit narrow containers). Default 200. |
thickness | number | Ring thickness in px. Default 12% of the size. | |
gap | number | Gap between segments in px. Default: the theme's --ui-donut-chart-gap. | |
label | string | Caption under the total in the center, e.g. "Visitors". | |
valueFormatter | ValueFormatter | Formats the center total, legend values, data table and announcements. | |
locale | string | BCP 47 locale for the default number formatting. Default: the ThemeProvider locale, then the browser's. | |
labels | Partial<DonutChartLabels> | Overrides for the built-in strings. | |
showLegend | boolean | true | Legend with values and percentages next to (or under) the ring. Default true. |
ariaLabel * | string | Accessible name of the chart (also the caption of its sr-only data table). |
Похожие компоненты
- Treemap — Иерархии площадями с переходом по уровням
- Funnel Chart — Воронки конверсии
- Sankey Chart — Диаграммы потоков между этапами
- Radar Chart — Лепестковые диаграммы для сравнения профилей
- Line Chart — Линейные графики
- Bar Chart — Столбчатые диаграммы
- Area Chart — Графики с заливкой
- Scatter Chart — Точечные и пузырьковые диаграммы с линией тренда
- Sparkline — Мини-графики
- Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
- Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
- Heatmap — Тепловые карты
Назад: Candlestick Chart · Далее: Treemap · Весь раздел «Графики и аналитика»