Shouldn’t it work with this library? <script src="https://d3js.org/d3.v4.js">
I’ve tried all the libraries that I can find about this and none of them get rid of this error. Any help would be great.
JavaScript
x
3
1
var x = d3.scaleBand().rangeRound([10, width]).padding(0.4),
2
y = d3.scaleLinear().rangeRound([height, 20]);
3
Advertisement
Answer
Instead of
JavaScript
1
3
1
var x = d3.scaleBand().rangeRound([10, width]).padding(0.4),
2
y = d3.scaleLinear().rangeRound([height, 20]);
3
Change .padding to .paddingInner like such
JavaScript
1
3
1
var x = d3.scaleBand().rangeRound([10, width]).paddingInner(0.4),
2
y = d3.scaleLinear().rangeRound([height, 20]);
3
Thanks to Darren Sweeney for the answer.