function _adjustCategoricalScale(scaleObject) {
  const scaleFn = getScaleFnFromScaleObject(scaleObject);
  const {domain, range} = scaleObject;
  if (domain.length > 1) {
    scaleObject.distance = Math.abs(scaleFn(domain[1]) - scaleFn(domain[0]));
  } else {
    scaleObject.distance = Math.abs(range[1] - range[0]);
  }

  return scaleObject;
}
Get an adjusted scale. Suitable for 'category' and 'ordinal' scales.
@param {Object} scaleObject Scale object.
@returns {*} Scale object with adjustments.
@private