data is not defined
我加了你的新代碼,但會有error, 說data is not defined.我不知道哪里做錯。
d3.csv("data.csv", type, function(data){
console.log(data);
});
function type(d){
d.population = +d.population;
return d;
}
var bar_width = 50,
bar_padding = 10,
svg_width = (bar_width + bar_padding) * data.length,? ?<-------'data is not defined'
svg_height=500;
2018-07-24
兄弟?這樣才對