Public Methods 
Returns a getDomain function
@param {Function} getDomainFromDataFunction: a function that takes props and axis and
returns a domain based on data
@param {Function} formatDomainFunction: a function that takes domain, props, and axis and
returns a formatted domain
@returns {Function} a function that takes props and axis and returns a formatted domain
function createDomainFunction(getDomainFromDataFunction, formatDomainFunction) {
  getDomainFromDataFunction = isFunction(getDomainFromDataFunction)
    ? getDomainFromDataFunction
    : getDomainFromData;
  formatDomainFunction = isFunction(formatDomainFunction) ? formatDomainFunction : formatDomain;
  return (props, axis) => {
    const propsDomain = getDomainFromProps(props, axis);
    if (propsDomain) {
      return formatDomainFunction(propsDomain, props, axis);
    }
    const categories = Data.getCategories(props, axis);
    const domain = categories
      ? getDomainFromCategories(props, axis, categories)
      : getDomainFromDataFunction(props, axis);
    return domain ? formatDomainFunction(domain, props, axis) : undefined;
  };
}