const arcTestGenerator = d3
.arc<any>()
.innerRadius(0)
.outerRadius(180)
.startAngle(0)
.endAngle(Math.PI / 2)
pieChartGroup
.append("path")
.attr("class", "test-path")
.attr("d", arcTestGenerator)
const data2 = [50, 50]
const arcs = d3.pie()(data2)
console.log("arcs", arcs)
d3.arc
需要把圓心放到中間畫
.attr("transform", `translate(${width / 2},${height / 2})`)
取得一些預設的顏色組合 d3-scale-chromatic