The createNumericScale.js has this repeating bit of code where the presence of range in the passed scale is checked. If none is given, then a default array is set as the range.
The way it is currently written, regardless of what you feed to the range prop in scale, it gets ignored because of this:
if (prop === 'radius') {
//console.log('5467', !scalingOptions.range)
if (!scalingOptions.range) {
console.warn(`No range specified for prop ${prop}. Defaulting to [0, 8]`)
}
range = [0, 8]
parseRange(range, scalingOptions) // parseRange does not alter range at all
}
So the solution would be
if (prop === 'radius') {
//console.log('5467', !scalingOptions.range)
if (!scalingOptions.range) {
console.warn(`No range specified for prop ${prop}. Defaulting to [0, 8]`)
}
range = [0, 8]
range = parseRange(range, scalingOptions) // parseRange alters the resulting range after some checks
}
The
createNumericScale.jshas this repeating bit of code where the presence ofrangein the passed scale is checked. If none is given, then a default array is set as therange.The way it is currently written, regardless of what you feed to the
rangeprop inscale, it gets ignored because of this:So the solution would be