How to show married couples with family tree in d3js?

42 views
Skip to first unread message

shib...@bhtech.in

unread,
Oct 18, 2016, 9:20:17 AM10/18/16
to d3-js

I have a problem regarding D3JS.  I have a client project that needs a family tree to be made. I am using D3js to do that using this as a reference http://bl.ocks.org/d3noob/8375092. My code is http://bhtech.in/shibnath/family_tree/tree1.php


I have also created a jsfiddle for this https://jsfiddle.net/shibnathroy/9xLgrmvz/1/


The problem is that D3js tree diagram only shows a parent child relationship from json data. My design also requires to also show married couples. I tried to do it by just keeping the couple as comma separated value in the name field and I gave a line break using javascript in the names of the couple. But now the problem is some people have multiple marriages in the nodes.

Can someone give me an idea to handle this and how to show the couple like in the image below?





Thanks in advance

Reply all
Reply to author
Forward
0 new messages