(opts: ResolvedChartGPUOptions)
| 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)) { |
no test coverage detected