function getAttr0Functor(props, attr) {
  const scaleObject = getScaleObjectFromProps(props, attr);
  if (scaleObject) {
    const {domain} = scaleObject;
    const {baseValue = domain[0]} = scaleObject;
    const scaleFn = getScaleFnFromScaleObject(scaleObject);
    return d => {
      const value = _getAttrValue(d, scaleObject.accessor0);
      return scaleFn(_isDefined(value) ? value : baseValue);
    };
  }
  return null;
}
Get the functor which extracts value form [attr]0 property. Use baseValue if
no attr0 property for a given object is defined. Fall back to domain[0] if no
base value is available.
@param {Object} props Object of props.
@param {string} attr Attribute name.
@returns {*} Function which returns value or null if no values available.