-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
Dense networks may be hard to visualize, but interactive features such as highlighting, zooming, and dragging can allow the user to interact with it, highlight paths, and adjust the topology to reveal different views of the data. In this section we will discuss some strategies using a simple network.
All examples reuse the same data and rendering functions. The code is in Interactive/js/alphabet.js. The data is contained in the following data arrays:
export const nodes = [{node: 'A'}, {node: 'B'}, …,{node: 'Z'}];
export const links = [{source: 0, target: 4, value: 3}, …,
{source: 19, target: 18, value: 2}]; The objects in the nodes array contain a node property with a letter, and links represent arbitrary connections between nodes. Their source and target properties refer to elements from the nodes array by their index, and value represents the weight of the connection.
Our example...