v3-API
d3.layout.pie
创建pie布局
pie.startAngle([angle])
设置起始角度。默认从12点钟开始。path默认从3点钟方向
【angle】: Math.Pi / 180pie.endAngle([angle])
设置终止角度
【angle】: Math.Pi / 180pie.padAngle([angle])
设置间隔角度
【angle】: Math.Pi / 180pie.sort([comparator])
用法
d3.layout.pie .sort(【comparator】)
【comparator】:
顺序: function comparator(a, b) {
return d3.ascending(parseInt(a[1]), parseInt(b[1])); //升序
}