Write algorithm to visualize Solidity AST as graph -- 2

Job ID: 37403173

Budget: $30 – $250 CAD

I want an outcome similar to the Surya library. In Javascript, write an algorithm (you can use libraries such as D3) to parse a Solidity AST that will return back an object of nodes and links WITH its x-y positions.

Surya uses some kind of layout algorithm and I'm not sure if it's with D3, but it arranges each node in a very clean manner.

Here's an example of my attempt at this: https://codesandbox.io/s/ast-graph-ctpmld?file=/src/App.js
I tried traversing the AST to get back the object but the outcome is no where as good as Surya, also I am missing the x-y position in the output object.


Please do not bid if you are not sure that you can take up this challenge.
Bid an amount that you will actually charge, don't make me ask the fee in DM's