Visualizing graphs (in the graph theory sense of the word) can be a challenge. Visualizing graphs on the web can be a even bigger challenge. Luckily there is JSNetworkX.
Here is an example, as shown in figure 1.
And here is the code for the graph visualization in figure 1, as shown in figure 2.Charles Iliya Krempeaux