Filling and Styling D3 Tree nodes based off of data

stuck on styling the Collapsible Tree example found at

D3 Code:

JSON: (but instead of size, using a field called status to set to some single digit integer )

Based on status number, I highlight the node… that i got working. But I need the color of the parent node to take on the color of its child. Can someone direct me on how to do that?

Please provide a full working example of what you have so far, it will be this part of the code you need to modify.

  .attr("r", 1e-6)
  .style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.