1
蜱我有一个D3曲线图,其中x轴蜱这样的:Y轴与错旋转
的代码段,用于做了下面的
vis.append("svg:g")
.attr("class", "x axis")
.style({ 'stroke': 'Black', 'fill': 'none', 'stroke-width': '1px' })
.attr("transform", "translate(0," + (height - margin.bottom) + ")")
.call(xAxis)
.selectAll("text")
.attr("y", 0)
.attr("x", 9)
.attr("dy", "0.35em")
.attr("transform", "rotate(120)")
.style("text-anchor", "start");
的事情是标签不可读。例如,“August”应该以“A”开始,而不是像我附加的图像中的“t”开始。
我试着改变“旋转”的值,即使它没有帮助。
有人可以帮我正确定位标签吗?
它的工作原理!非常感谢 ! – ashani123