How to show graph in connected format from initial page

when we connected the each node and refreshed the page it will be showing correct connected format.

What is the question? What is the problem? Please describe what you are doing and how it does not do what you want.