Please find the image attached here .I want the sunburst chart to look like this 我正在使用示例 http://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099
任何人都可以帮我修改这段代码,以获得带有巨大空心的均匀薄环吗?
答案 0 :(得分:0)
d3 arc实现非常简单。它全部关于四个参数
outerRadius
var arc = d3.arc()
.startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x0))); })
.endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x1))); })
.innerRadius(function(d) { return Math.max(0, y(d.y0)); })
.outerRadius(function(d) { return Math.max(0, y(d.y1)); });
以及弧的半径。 在上面描述的参数中做一些改变弧的改变