integrate most of d3edge (missing only HTML fragment from GSP)