(slices: ReadonlyArray<PieDataItem>, animation: ChartGPUOptions['animation'])
| 122 | }; |
| 123 | |
| 124 | const createPieOptions = (slices: ReadonlyArray<PieDataItem>, animation: ChartGPUOptions['animation']): ChartGPUOptions => { |
| 125 | return { |
| 126 | grid: { left: 24, right: 120, top: 24, bottom: 24 }, |
| 127 | // These axes are unused for pie rendering; keep them minimal. |
| 128 | xAxis: { type: 'value', min: 0, max: 1, tickLength: 0, name: '' }, |
| 129 | yAxis: { type: 'value', min: 0, max: 1, tickLength: 0, name: '' }, |
| 130 | theme, |
| 131 | tooltip: { show: true, trigger: 'item' }, |
| 132 | animation, |
| 133 | series: [ |
| 134 | { |
| 135 | type: 'pie', |
| 136 | name: 'Breakdown', |
| 137 | color: '#00E5FF', |
| 138 | radius: ['36%', '74%'], |
| 139 | center: ['50%', '50%'], |
| 140 | startAngle: 90, |
| 141 | data: slices, |
| 142 | }, |
| 143 | ], |
| 144 | }; |
| 145 | }; |
| 146 | |
| 147 | const attachCoalescedResizeObserver = ( |
| 148 | containers: ReadonlyArray<HTMLElement>, |
no outgoing calls
no test coverage detected