With data like:
var days = ["Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat"];
I need to have the html structure become:
Sun
Mon
.... Etc
Currently my current failed solution is:
var selection = d3.select("div");
var enter = selection.selectAll("input").data(days).enter()
enter.append("input")
.attr("type","checkbox")
.attr("id",function(d,i){ return "day"+i;})
enter.append("label")
.attr("for",function(d,i){ return "day"+i;})
.text(function(d,i){return daysAbbr[i];})
Which gives me an incorrect dom of:
.... Etc
Sun
Mon
.... Etc
How wo