function timeIntervalBarWidth(interval) {
	return function(props, moreProps) {
		const { widthRatio } = props;
		const { xScale, xAccessor, plotData } = moreProps;

		const first = xAccessor(head(plotData));
		return Math.abs(xScale(interval.offset(first, 1)) - xScale(first)) * widthRatio;
	};
}
Generates a width function that calculates the bar width based on the given time interval.
@param interval a d3-time time interval.
@return {Function} the width function.