function getXYPlotValues(props, children) {
  const XYPlotScales = XYPLOT_ATTR.reduce((prev, attr) => {
    const {
      [`${attr}Domain`]: domain,
      [`${attr}Range`]: range,
      [`${attr}Type`]: type
    } = props;

    if (domain && range && type) {
      return {
        ...prev,
        [attr]: SCALE_FUNCTIONS[type]()
          .domain(domain)
          .range(range)
      };
    }
    return prev;
  }, {});

  return children.map(child =>
    XYPLOT_ATTR.reduce((prev, attr) => {
      if (child.props && child.props[attr] !== undefined) {
        const scaleInput = child.props[attr];
        const scale = XYPlotScales[attr];
        const fallbackValue = scale ? scale(scaleInput) : scaleInput;
        return {
          ...prev,
          [`_${attr}Value`]: fallbackValue
        };
      }
      return prev;
    }, {})
  );
}
Creates fallback values for series from scales defined at XYPlot level.
@param {Object} props Props of the XYPlot object.
@param {Array<Object>} children Array of components, children of XYPlot
@returns {Array<Object>} Collected props.