MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / createSeedData

Function createSeedData

examples/live-streaming/main.ts:74–83  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

72};
73
74const createSeedData = (count: number): DataPoint[] => {
75 const n = Math.max(2, Math.floor(count));
76 const out: DataPoint[] = new Array(n);
77 for (let i = 0; i < n; i++) {
78 const x = i * 0.02;
79 const y = Math.sin(x) * 0.8 + Math.sin(x * 0.23 + 1.2) * 0.25;
80 out[i] = [x, y] as const;
81 }
82 return out;
83};
84
85async function main(): Promise<void> {
86 const container = document.getElementById('chart');

Callers 2

mainFunction · 0.85
resetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected