Please find the image attached here .I want the sunburst chart to look like this我使用的例子在 http://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099我想有均勻的薄環
一D3 V4旭日形圖誰能幫我修改這個代碼,以獲得均勻的薄環與一個巨大的空心中心?
Please find the image attached here .I want the sunburst chart to look like this我使用的例子在 http://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099我想有均勻的薄環
一D3 V4旭日形圖誰能幫我修改這個代碼,以獲得均勻的薄環與一個巨大的空心中心?
d3弧的實現是相當容易的。這是所有關於四個參數
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)); });
,也是半徑的圓弧。 在上面提到的參數做一些改變,將改變弧線
我嘗試了各種組合在弧..只有然後我張貼!我發佈了一張圖片,我想讓sunburst圖表像這樣呈現 – Latha