0
が、私はここにplunkerを持っているラベル。D3角度グラフの軸は
軸にラベルを追加するにはどうすればよいですか。
これは、軸にlablesを追加すると考えました。
private drawAxis() {
this.g.append("g")
.attr("class", "axis axis--x")
.attr("transform", "translate(0," + this.height + ")")
.call(d3.axisBottom(this.x))
.classed('x axis', true)
.call(this.x)
.append('text')
.attr("transform",
"translate(" + (this.width/2) + " ," +
(this.height + this.margin.top + 20) + ")")
.style("text-anchor", "middle")
.text("Letters");
this.g.append("g")
.attr("class", "axis axis--y")
.call(d3.axisLeft(this.y).ticks(10, "%"))
.append("text")
.attr("class", "axis-title")
.attr("transform", "rotate(-90)")
.attr("y", 6)
.attr("dy", "0.71em")
.attr("text-anchor", "end")
.text("Frequency");
}