ValyroUI English version

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';

Пропсы

PropTypeDefault
data *DonutSegment[]Segments in drawing order, clockwise from the top; zero, negative and non-finite values take no space.
sizenumber200Diameter in px (shrinks to fit narrow containers). Default 200.
thicknessnumberRing thickness in px. Default 12% of the size.
gapnumberGap between segments in px. Default: the theme's --ui-donut-chart-gap.
labelstringCaption under the total in the center, e.g. "Visitors".
valueFormatterValueFormatterFormats the center total, legend values, data table and announcements.
localestringBCP 47 locale for the default number formatting. Default: the ThemeProvider locale, then the browser's.
labelsPartial<DonutChartLabels>Overrides for the built-in strings.
showLegendbooleantrueLegend with values and percentages next to (or under) the ring. Default true.
ariaLabel *stringAccessible 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 · Весь раздел «Графики и аналитика»