Atelier UI

搜索组件…

搜索组件…

Donut Chart

环形图,悬停或聚焦分段时高亮并更新中心数值,附图例。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

DonutChartProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"div">, "children">

属性类型默认值说明
data* 必填DonutDatum[]——
totalLabelstring"Total"Label shown under the total in the centre
titlestring"Donut chart"—

安装

$ npx shadcn@latest add https://chromotion.dev/r/donut-chart.json

同类组件