|
|
@ -73,9 +73,9 @@ export const PieChart = ({ parts, labels, total, totalLabel }) => {
|
|
|
|
g.fillText(
|
|
|
|
g.fillText(
|
|
|
|
label,
|
|
|
|
label,
|
|
|
|
Math.cos(acc + angle / 2 - 0.5 * Math.PI) *
|
|
|
|
Math.cos(acc + angle / 2 - 0.5 * Math.PI) *
|
|
|
|
(width * 0.5 * 0.7 - textRadius * 0.8),
|
|
|
|
(width * 0.5 * 0.85 + textRadius * 0.8),
|
|
|
|
Math.sin(acc + angle / 2 - 0.5 * Math.PI) *
|
|
|
|
Math.sin(acc + angle / 2 - 0.5 * Math.PI) *
|
|
|
|
(width * 0.5 * 0.7 - textRadius * 0.8)
|
|
|
|
(width * 0.5 * 0.85 + textRadius * 0.8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
acc += angle
|
|
|
|
acc += angle
|
|
|
|