I have the following SVG element were i have a text on the graph.
wrapper.append("text")
.text(data[i].name)
.attr("x", 10)
.attr("y", 30)
.attr("class", "text-class")
I want to apply
word-break: break-word; to the text so that it falls to the second line when the characters are more and doesn't overflow the chart. i tried styling the class text-class also tried inline styling like .attr("word-break", 'break-word')
. but it doesn't seems to be working. can someone tell me how can i achieve this.