function getAttributeFunctor(props, attr) {
  const scaleObject = getScaleObjectFromProps(props, attr);
  if (scaleObject) {
    const scaleFn = getScaleFnFromScaleObject(scaleObject);
    return d => scaleFn(_getAttrValue(d, scaleObject.accessor));
  }
  return null;
}
Get prop functor (either a value or a function) for a given attribute.
@param {Object} props Series props.
@param {Function} accessor - Property accessor.
@returns {*} Function or value.