d3 checkbox - label / input order
问题 I have checkbox set including labels and inputs. Initially, I've made a div as a wrapper for label and input above svg because I want to have the checkbox avobe svg. And then I bind data to make checkboxes including label and input according to nested data key. var countryWrapper = d3.select(".checkboxWrapper") var countryButton = countryWrapper .selectAll(".checkboxes") .data(nest) .enter() .append("label") .attr('for', function(d) { return d.key; }) .text(function(d) { return d.key; })