MCPcopy
hub / github.com/ChartGPU/ChartGPU / createPieOptions

Function createPieOptions

examples/data-update-animation/main.ts:124–145  ·  view source on GitHub ↗
(slices: ReadonlyArray<PieDataItem>, animation: ChartGPUOptions['animation'])

Source from the content-addressed store, hash-verified

122};
123
124const 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
147const attachCoalescedResizeObserver = (
148 containers: ReadonlyArray<HTMLElement>,

Callers 2

mainFunction · 0.85
updateChartsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected