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

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -