Skip to main content
100%

Particle Edges Dendrogram

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 8, 2016
Created on Aug 15, 2016

A dendrogram tree visualization uses animated particle edges to display the connections between nodes, with each edge generating and moving colored circles along its path. The layout is computed with `d3.layout.tree`, and the tree structure is derived from a JSON dataset representing word relationships. Particles are created and updated per tick using `d3.timer` and the `d3_glyphEdge.mutate.particle` API, which mutates each edge's `.particles` array based on properties like `.frequency` and `.speed`. The particles are rendered as SVG circles, while the static tree links appear as thin black paths.

AI-generated description

Particle edges from d3_glyphEdges are the most difficult edge type to implement. Here's an example using a dendrogram and the connecting paths from the dendrogram. Remember that d3_glyphEdge.mutate.particle mutates the edge data object, spawning new particles, updating the position of existing particles and deleting particles that have reached the end of the path, and it's this array that you use to represent the particles (either with SVG as in this example or, if you're dealing with a lot of particles, probably canvas). As such, an edge object needs to have, along with .source and .target, .frequency (a positive number) to indicate the number of particles created per tick and .particles (an array) to hold the created particles.

d3_glyphEdge.mutate.particle does not include its own tick function so you need to create your own. This example uses d3.timer whereas this network example uses the built-in tick function in d3.layout.force.

Similar vizzes