d3/d3-scale

Allow for unlimited outer padding

hhrogersii opened this issue · 0 comments

In D3v3 the d3.scale.ordinal().rangeBands(interval[, padding[, outerPadding]]) accepted an outerPadding value greater than 1. I was using this to prevent the bandwidth on a bar chart from exceeding a defined max bar width. In D3v4 the d3.scaleBand().paddingOuter() will clip any value greater than 1. While this makes sense for most bar chart layouts, for charts with one or two bars, the bars can be exceedingly wide. Also, as a general drawing language, it would be helpful to allow unlimited outer margins.
outer-padding
Pull request with one test change: #101