MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / shouldComputeVisibleYBounds

Function shouldComputeVisibleYBounds

src/core/createRenderCoordinator.ts:1747–1754  ·  view source on GitHub ↗
(opts: ResolvedChartGPUOptions)

Source from the content-addressed store, hash-verified

1745 let cachedVisibleYBounds: Bounds | null = null;
1746
1747 const shouldComputeVisibleYBounds = (opts: ResolvedChartGPUOptions): boolean => {
1748 const autoBoundsMode = opts.yAxis.autoBounds ?? 'visible';
1749 if (autoBoundsMode !== 'visible') return false;
1750 // If both bounds are explicit, auto-bounds (including visible) are never consulted.
1751 const explicitMin = finiteOrUndefined(opts.yAxis.min);
1752 const explicitMax = finiteOrUndefined(opts.yAxis.max);
1753 return !(explicitMin !== undefined && explicitMax !== undefined);
1754 };
1755
1756 const recomputeCachedVisibleYBoundsIfNeeded = (): void => {
1757 if (shouldComputeVisibleYBounds(currentOptions)) {

Callers 1

Calls 1

finiteOrUndefinedFunction · 0.70

Tested by

no test coverage detected