I am new to d3.js After a few hour research. I found out this tutorial for my ideal dependency graph that I was looking for.
Links: https://bl.ocks.org/agnjunio