MCPcopy
hub / github.com/microsoft/data-formulator / genRadarData

Function genRadarData

src/lib/agents-chart/test-data/chartjs-tests.ts:142–157  ·  view source on GitHub ↗
(seed: number)

Source from the content-addressed store, hash-verified

140}
141
142function genRadarData(seed: number) {
143 const rand = seededRandom(seed);
144 const metrics = ['Speed', 'Power', 'Defense', 'Stamina', 'Accuracy', 'Agility'];
145 const entities = ['Player A', 'Player B', 'Player C'];
146 const data: any[] = [];
147 for (const e of entities) {
148 for (const m of metrics) {
149 data.push({
150 Metric: m,
151 Score: Math.round(30 + rand() * 70),
152 Player: e,
153 });
154 }
155 }
156 return data;
157}
158
159// ---------------------------------------------------------------------------
160// Test case builders

Callers 1

genChartJsRadarTestsFunction · 0.85

Calls 1

seededRandomFunction · 0.90

Tested by

no test coverage detected