当我要旋转tic标题时,不支持d3 v4中的图形轴标题

在d3 v4中绘制图形时,我希望将轴航向与tic航向一起旋转一定角度, 尝试时,我一次只能一次工作,而不能一次都工作

我正在使用的代码是

svg.append("g")
.attr("transform","translate(0,"+ (height) +")")
.call(d3.axisBottom(x))
.selectAll("text")
    .attr("y",0)
    .attr("x",9)
    .attr("dy",".35em")
    .attr("transform","rotate(60)")
    .style("text-anchor","start")  
    .append("text")
                    .attr("transform","rotate(0)")
                    .attr("x",200)
                    .attr("y",50)
                    .attr("fill","#000")
                    .attr("font-size","14px")
                    .attr("text-anchor","end")
                    .text("System time in seconds");

还有其他方法吗?

tan243991552 回答:当我要旋转tic标题时,不支持d3 v4中的图形轴标题

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3162030.html

大家都在问