跳到内容

PiePlotAPI

React PiePlot 组件的 API 参考文档。了解此导出模块的 props、CSS 和其他 API。

演示

导入

import { PiePlot } from '@mui/x-charts/PieChart';
// or
import { PiePlot } from '@mui/x-charts';
// or
import { PiePlot } from '@mui/x-charts-pro';

阅读关于最小化捆绑包大小的指南,了解它们之间的区别。

Props

名称类型默认值描述
onItemClickfunc-

当饼图项被点击时触发的回调。

签名:function(event: React.MouseEvent, pieItemIdentifier: PieItemIdentifier, item: DefaultizedPieValueType) => void
  • event 回调的事件源。
  • pieItemIdentifier 饼图项标识符。
  • item 饼图项。
skipAnimationboolfalse

如果为 true,则跳过动画。

slotPropsobject{}

用于每个组件插槽的 props。

slotsobject{}

可覆盖的组件插槽。

有关更多详细信息,请参阅下面的插槽 API

该组件不能持有 ref。

插槽

插槽名称类名默认组件描述
pieArc
pieArcLabel

源代码

如果您在此页面中没有找到所需信息,请考虑查看组件的实现以获取更多详细信息。