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

Function tick

examples/sampling/main.ts:214–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 let rafId: number | null = null;
213 let lastKey = '';
214 const tick = (): void => {
215 const z = chart.getZoomRange();
216 const key = z
217 ? `${z.start.toFixed(3)}:${z.end.toFixed(3)}:${controls.mode}:${controls.threshold}`
218 : `null:${controls.mode}:${controls.threshold}`;
219 if (key !== lastKey) {
220 lastKey = key;
221 updateReadouts(data.length, xMax, controls, z);
222 }
223 rafId = requestAnimationFrame(tick);
224 };
225
226 updateReadouts(data.length, xMax, controls, chart.getZoomRange());
227 rafId = requestAnimationFrame(tick);

Callers

nothing calls this directly

Calls 2

updateReadoutsFunction · 0.85
getZoomRangeMethod · 0.65

Tested by

no test coverage detected