以下代码用于显示javascript树图的文本标签.
nodeEnter.append("svg:text")
.attr("x", function(d) { return d._children ? -8 : -48; }) /*the position of the text (left to right)*/
.attr("y", 3) /*the position of the text (Up and Down)*/
.text(function(d) { return d.name; });
Run Code Online (Sandbox Code Playgroud)
这使用svg,它没有自动换行功能.如何更改这个正常段落
所以我可以使用CSS来自动换行.如何制作这个常规文本而不是svg文本?