Trimming node lables
bmesuere opened this issue · 0 comments
bmesuere commented
There is no option to trim node labels. This causes some overlap issues for long EC and GO names.
In the previous treeview I added the following piece of code to trim the nodes:
nodeEnter.append("text")
.attr("x", function (d) {
return isLeaf(d) ? -10 : 10;
})
.attr("dy", ".35em")
.attr("text-anchor", function (d) {
return isLeaf(d) ? "end" : "start";
})
.text(function (d) {
return d.name.length > 33 && (d._children || d.children) ? d.name.substring(0,30).trim()+"..."
: d.name;
})
.style("font", "10px sans-serif")
.style("fill-opacity", 1e-6);
Original issue by calmalak on Mon Jun 27 2016 at 17:34.
Closed by @bmesuere on Mon Jun 27 2016 at 17:57.