var arc_generator = d3.arc()
var color = d3.schemeCategory10; // 直接就是數(shù)組
var color = d3.schemeCategory10; // 直接就是數(shù)組
2017-08-16
目前的d3 v4版本,視頻中的scale_x設(shè)置方法如下:
var scale_x = d3.scaleBand()
.domain(data.map(function (d) {
return d.population;
}))
.range([0, width])
.padding(.1);
版本差異:https://github.com/d3/d3/blob/master/CHANGES.md
var scale_x = d3.scaleBand()
.domain(data.map(function (d) {
return d.population;
}))
.range([0, width])
.padding(.1);
版本差異:https://github.com/d3/d3/blob/master/CHANGES.md
2017-08-16
目前attr({name:value})的方法我用著無效。如果有遇到相同問題的,可以多次調(diào)用attr(name,value)即可。
2017-08-15
text默認(rèn)隱藏的,在d3.js v4中 設(shè)置一個(gè)css屬性就好 text{
fill:black;
}
fill:black;
}
2017-04-19
大家看的時(shí)候?qū)χ鴄pi查一查就好
https://github.com/d3/d3/blob/master/API.md#axes-d3-axis
https://github.com/d3/d3/blob/master/API.md#axes-d3-axis
2017-04-19