code: function maybeScaleToFit (G, nested) {
      if (scale !== null) return
      const maxValue = sum(nested.bandValues)
      if (maxValue <= 0) {
        scale = 1
      } else {
        scale = (y1 - y0) / maxValue
        if (whitespace !== 1) scale *= (1 - whitespace)
      }
    }
docs: sankey.scaleToFit = function (graph) {