| 130 | const _layoutNodesBasedOn: Record<'value' | 'symbolSize', LayoutNode> = { |
| 131 | |
| 132 | value(seriesModel, graph, nodeData, r, cx, cy, count) { |
| 133 | let angle = 0; |
| 134 | const sum = nodeData.getSum('value'); |
| 135 | const unitAngle = Math.PI * 2 / (sum || count); |
| 136 | |
| 137 | graph.eachNode(function (node) { |
| 138 | const value = node.getValue('value') as number; |
| 139 | const radianHalf = unitAngle * (sum ? value : 1) / 2; |
| 140 | |
| 141 | angle += radianHalf; |
| 142 | node.setLayout([ |
| 143 | r * Math.cos(angle) + cx, |
| 144 | r * Math.sin(angle) + cy |
| 145 | ]); |
| 146 | angle += radianHalf; |
| 147 | }); |
| 148 | }, |
| 149 | |
| 150 | symbolSize(seriesModel, graph, nodeData, r, cx, cy, count) { |
| 151 | let sumRadian = 0; |