D3: .scaleLinear, .axisRight: Axis Right

Forked script below was converted from D3.js v3 to v4.

nick3499
1 min readFeb 28, 2017

d3.scaleLinear() and d3.axisRight() are v4 functions which have replaced d3.scale.linear() and d3.svg.axis().orient("right") respectively. d3.attr() calls are separate, e.g. .attr("width", width). axisNodes.selectAll() calls have been commented out because v4 ignores them.

The adapted code above is for v4, while the original code below is for v3.

D3 3.5.17 seems to have a similar existence to Python 2.7.16. Maintained to avoid alienating current users.

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet