Closed GitHubish closed 7 years ago
Assuming that your nodes
array is a hierarchical data array used for the d3 pack layout, your code would probabnly look something like this:
d3plus.textBox()
.data(data)
.height(function(d) { return d.r; })
.select(g.node())
.text(function(d) { return d.data.name; })
.textAnchor("middle")
.verticalAlign("middle")
.width(function(d) { return d.r; })
.x(function(d) { return d.x - d.r; })
.y(function(d) { return d.y - d.r; })
.render();
Hello,
I am trying to make d3plus-text work with my circle packing (d3 v4) but I do not understand how to integrate it. Can you please help me understand how it works so that my texts are wrapped in their container.
Thank you
Actually :