I'm confused about this behavior and was hoping someone might have some insight. I have an array defined as:
arr_subpop_unique = ["CPL", "NAP", "NPL", "SAP", "SPL", "TPL", "UMW", "WMT", "XER"]
My D3 script is such:
var sizemapHeader = d3.select("#d3-sizemap-hr").selectAll("div")
.data(arr_subpop_unique)
.enter().append("div")
.attr("class", "sizemap-hr-title ellipsis scroll_on_hover")
.html(function(d,i){ console.log(d,i); return d; });
The issue is that the index is starting on 1, so I am losing the "CPL" value. I'm logging this in the console and it clearly starts at 1 instead of 0. Can anyone see a problem with this?
Thanks!