O'Reilly logo

HTML5 Data and Services Cookbook by Mite Mitreski, Gorgi Kosev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying a force directed graph

In this recipe, we will create a graph with some of the characters of the play Hamlet by William Shakespeare. The idea is to visualize the connections between the characters in a fun and interactive way. The type of graph that will be visualized is known as force directed graph.

Displaying a force directed graph

Getting ready

In order to visualize the connections between the characters, they need to be stored somehow. There is a sample data.json file that is a part of the code examples that you can use. Although we do encourage you to create your own sample data or at least play around with the existing one, but for the purpose of simplicity, we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required