(xCenterRange: number)
| 190 | let hitIndex = -1; |
| 191 | |
| 192 | const isHit = (xCenterRange: number): boolean => { |
| 193 | if (!Number.isFinite(xCenterRange)) return false; |
| 194 | const left = xCenterRange + offsetLeftFromCategoryCenter; |
| 195 | const right = left + barWidth; |
| 196 | // Expanded interval: [left - tol, right + tol) |
| 197 | return xValue >= left - hitTol && xValue < right + hitTol; |
| 198 | }; |
| 199 | |
| 200 | if (seriesHasNaNX(data, isTuple)) { |
| 201 | // NaN breaks ordering; linear scan for correctness. |