【发布时间】:2018-12-19 05:52:23
【问题描述】:
我正在为 PieCharts 使用 recharts 库。
paddingAngle={0} 能够移除填充角但想要移除单元格分隔符(白色)。
代码:
const data = [
{ id: "1", name: "L1", value: 75 },
{ id: "2", name: "L2", value: 25 }
];
<PieChart width={50} height={50}>
<text
x={25}
y={25}
textAnchor="middle"
dominantBaseline="middle"
>
25
</text>
<Pie
data={data}
dataKey="value"
innerRadius="80%"
outerRadius="100%"
fill="#82ca9d"
startAngle={90}
endAngle={-270}
paddingAngle={0}
cornerRadius={5}
>
<Cell
key="test"
fill="#CCC"
/>
</Pie>
</PieChart>
当前看起来像:
想要这样实现:
如何做到这一点?
谢谢
【问题讨论】:
-
请与我们分享一些代码,以便我们正确理解您的问题并为您提供帮助。
-
@CodeMeNatalie 请查看带有代码的更新问题。
标签: css reactjs charts pie-chart recharts