Saturday 20 May 2017

How to Apply Preferences to d3.tree node; HTML code

I have adapted a code from

https://bl.ocks.org/mbostock/4063550

to make a nice figure for the tidy arrangement of layered nodes. Assume I have a similar flare.csv file as on the webpage. The code right now assigns color based on whether a node is on an internal circle (which means the node has two links) or on an outer circle.

What I want instead is to assign a specific color (let's say blue) to the point located in the center (the parent node) whose name is flare. Also I want to assign a specific color(let's say red) to all outer-circle nodes (those have only one connection) which name is "sub".

All other nodes could be only black.

How can I implement what I want in the HTML code?

I do highly appreciate any helps.

Thanks.

HRJ



via H.RJ

No comments:

Post a Comment