var width = 600,
height = 400,
radius = Math.min(width, height) / 2 ,
color = d3.scale.category20();
var svg = d3.select("body").append("svg")
.attr("width",width)
.attr("height",height)
.append("g")
.attr("transform", "translate(" + radius + "," + radius + ")");
//定义分区图函数
var partition = d3.layout.partition()
.sort(null)
.size([Math.PI*2,radius*radius])
.value(function (d) {
return 1
})
//读取数据并绘制