html - d3.csv with two-word key columns -
i using csv file of keys two-words (separated white space). want load csv file using d3.csv not figure out how reference data in two-word columns (using d.key.)
this code display nothing:
svg.selectall("circle").transition().duration(1000) .attr("cx",function(d) {return x(+d.percent obese 2000);}) .attr("cy",function(d) {return y(+d.percent obese 2000);}) .attr("r",5) could me
you can use parentheses , quotes:
.attr("cx",function(d) {return x(+d["percent obese 2007"]);}) ...
Comments
Post a Comment