|
|
|
@ -50,13 +50,14 @@ export function PieSlice(props: PieSliceProps<PieChartData>) { |
|
|
|
|
const pathArc = props.path(arc); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<g key={`arc-${arc.data.category}`}> |
|
|
|
|
<path d={pathArc} className={styles.path} /> |
|
|
|
|
<g key={`arc-${arc.data.category}`} className={styles.group}> |
|
|
|
|
<path className={styles.path} d={pathArc} /> |
|
|
|
|
<text |
|
|
|
|
className={styles.text} |
|
|
|
|
x={centroidX} |
|
|
|
|
y={centroidY} |
|
|
|
|
textAnchor="middle" |
|
|
|
|
>{`${arc.data.value} %`}</text> |
|
|
|
|
>{`${arc.data.value}%`}</text> |
|
|
|
|
</g> |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|