Architecting Static Threshold Lines in Chart.js Plugins: Boundary Checks and Scale Mapping
Draw a static threshold line in Chart.js using an <code>afterDraw</code> plugin. Use <code>getPixelForValue</code> for precise Y-coordinate mapping while strictly guarding against <code>NaN</code> results from out-of-range values.