D3: .scaleLinear, .axisTop: Axis Top

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

nick3499
1 min readFeb 28, 2017

d3.scaleLinear() and d3.axisTop() are exclusively D3 v4 functions which replace D3 v3’s d3.scale.linear() and d3.svg.axis().orient("top"). The two axisNodes.selectAll() calls were commented out because v4 ignores them. .tickSize() and .tickPadding() were also added.

The script above was adapted to v4, based on the original version (D3.js v3) displayed below:

D3.js 3.5.17 seems to have a similar existence as Python 2.7.13. Maintained to avoid alienating users.

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet