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

Function applyAutoBounds

examples/million-points/main.ts:258–264  ·  view source on GitHub ↗
(
    resolved: ResolvedChartGPUOptions,
    autoBounds: 'visible' | 'global'
  )

Source from the content-addressed store, hash-verified

256 });
257
258 const applyAutoBounds = (
259 resolved: ResolvedChartGPUOptions,
260 autoBounds: 'visible' | 'global'
261 ): ResolvedChartGPUOptions => {
262 if ((resolved.yAxis.autoBounds ?? 'visible') === autoBounds) return resolved;
263 return { ...resolved, yAxis: { ...resolved.yAxis, autoBounds } };
264 };
265
266 // Pre-resolve both sampling modes once (avoids re-scanning 1M points on UI toggles).
267 const resolvedOptionsBySampling: Record<'lttb' | 'none', ResolvedChartGPUOptions> = {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected