function getScalePropTypesByAttribute(attr) {
  return {
    [`_${attr}Value`]: PropTypes.any,
    [`${attr}Domain`]: PropTypes.array,
    [`get${toTitleCase(attr)}`]: PropTypes.func,
    [`get${toTitleCase(attr)}0`]: PropTypes.func,
    [`${attr}Range`]: PropTypes.array,
    [`${attr}Type`]: PropTypes.oneOf(Object.keys(SCALE_FUNCTIONS)),
    [`${attr}Distance`]: PropTypes.number,
    [`${attr}BaseValue`]: PropTypes.any
  };
}
Get prop types by the attribute.
@param {string} attr Attribute.
@returns {Object} Object of xDomain, xRange, xType, xDistance and _xValue,
where x is an attribute passed to the function.