D3: .axisLeft, .scaleLinear: Axis Left with Inverted Labels
.axisLeft()
and.scaleLinear()
are v4 functions which require the.v4.min.js
library..attrs({})
is a v4 function which contains multiple attribute tuples and requires thed3-selection-multi.v1.min.js
plugin, e.g..attrs({width: width, height: height})
.axisNodes.selectAll()
calls were commented out because v4 ignores them. Invert labels from descending to ascending by changing.domain([0, maxValue])
to.domain([maxValue, 0])
.
Adapted script above is based on v4 and original script below is based on v3.
D3.js 3.5.17 seems to have a similar existence to Python 2.7.13 as a version maintained mainly to avoid alienating users.