var text = vis.selectAll("text")
.data(words, function(d) { return d.text.toLowerCase(); });
text.enter().append("text")
.attr("text-anchor", "middle")
.attr("transform", function(d) {
return "translate(" + [d.x, d.y] + ")"})
.style("font-size", function(d) { return d.size + "px"; })
var bbox = text.node().getBBox();
का उपयोग कर टेक्स्ट क्षेत्र प्राप्त करना प्रत्येक पाठ के टेक्स्ट क्षेत्र को प्राप्त करने के लिए मैं getBBox() का उपयोग कैसे करूं?getBBox()
धन्यवाद। इस जवाब ने मुझे स्टैक ओवरफ्लो पर अधिक जानकारी प्राप्त करने में मदद की और मैं सभी जानकारी प्राप्त करने के लिए text.each (फ़ंक्शन (डी, i)) का उपयोग कर रहा हूं। मुझे googling के घंटे बचाया :) –