src/js/util/scale-utils.js
function generate_scale(type, scaleOptions, data, range, additionalOpts) {
	if (!scaleOptions) return {};
	return scale_types[type](scaleOptions, data, range, additionalOpts);
}
function generate_scale(type, scaleOptions, data, range, additionalOpts) {
	if (!scaleOptions) return {};
	return scale_types[type](scaleOptions, data, range, additionalOpts);
}
generateScale

@param type
@param scaleOptions
@param data
@param range
@returns {scale: d3 scale, tickValues: array, tickFormat: format func}