-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
The majority of scales (including sequential and diverging) support calling rangeRound() to return the rounded min and max.
However, time (underpinned by continuous) only supports .rangeRound([min, max]).
Not passing in arguments causes the method to throw, since the range gets set to undefined, then the scale expects the range to be defined!
Uncaught TypeError: Cannot read property 'length' of undefined
function rescale() {
var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear,
uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
output = linear(domain, range, uninterpolate, interpolate);
input = linear(range, domain, uninterpolate, d3_interpolate);
return scale;
}Metadata
Metadata
Assignees
Labels
No labels