Closed tothuhien closed 2 years ago
Dear @tothuhien,
element
will return a d3 selector for the <g>
SVG element for this node. You can change node color by selecting all the circles contained in that element, by changing
element.style("fill","blue")
to
element.selectAll ("circle").style("fill","blue")
Otherwise "fill" applies to <g>
and is overridden by individual element styles for the children of <g>
.
Best, Sergei
Thank you for your explanation, it works perfectly. Very much appreciated! Hien
I've just started to use phylotree.js and I want to change the color of the internal nodes but failed. Here is an example of the code I have:
but it just changes the color of the tip labels into blue. How to change the color of the circles representing the internal nodes? Thank you very much for your help. Hien