Using Physics to Create a Force-Directed Graph

This chapter will cover how to make a force-directed graph that will visualize the relationships between various nodes.

In this lesson, you will learn about the following topics:

  • Creating a physics-based force that will center nodes
  • Creating a physics-based force that make the nodes repel each other
  • Creating a physics-based force that will link the nodes to show their relationships

The complete code for this section can be found at https://github.com/PacktPublishing/D3.js-Quick-Start-Guide/tree/master/Chapter07.

Get D3.js Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.