function makeRangeBarChartProps()

in src/BarChart.js [7:19]


function makeRangeBarChartProps(barChartProps) {
  // this component is a simple wrapper around RangeBarChart,
  // passing accessors to make range bars which span from zero to the data value
  const { horizontal, x, y } = barChartProps;

  return {
    ...barChartProps,
    x: horizontal ? 0 : x,
    y: horizontal ? y : 0,
    xEnd: horizontal ? x : undefined,
    yEnd: horizontal ? undefined : y,
  };
}