How to change the color of all links with determined initial and final d.data.id in a d3.tree tidy code?

*爱你&永不变心* 提交于 2020-01-17 10:13:09

问题


So far I have received great helps and answers regarding my previous question on d3.tree code.

I have two more questions and hope someone kindly assist me.

Assume I have the same flare.csv file as the one in my previous question (with small modifications), that is,

A
A.A
A.A.B
A.A.C
A.B
A.B.C
A.C
A.C.D
A.D
A.D.A
A.D.B
A.D.D
A.E
A.E.A
A.E.B
A.F
A.H

How can I modify the code such that all links between A and B (that is A is the parent and B is the child) become yellow, for instance? Note that I don't want any change in cases where B is the parent and A is the child.

My other question which is not of my main interest right now, is if it is possible to change the code such that all outer children appear on the outer circle? In other words and in context of my flare.csv, I want

 A.F
 A.H
 A.A.B
 A.A.C
 A.B.C
 A.C.D
 A.D.A
 A.D.B
 A.D.D
 A.E.A
 A.E.B  

all appear in the same layer. Is it possible?

Thank you so much.

来源:https://stackoverflow.com/questions/44168459/how-to-change-the-color-of-all-links-with-determined-initial-and-final-d-data-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!