Skip to main content
100%

Collapsible List 2

✓ Published0🌍 Public
BBenjamin Ogorek
Last edited Mar 21, 2020
Created on Mar 21, 2020
Forked from HTML Starter

This example demonstrates a collapsible list that expands and collapses nested tree data on click. It uses d3’s `select`, `selectAll`, `data`, `enter`, and `append` methods to bind an array of objects (with “Letter” and “Number” parent nodes) to HTML `li` elements inside a `ul`. Clicking a parent toggles its child items by adding or removing a nested `ul` via event handlers `expand` and `collapse`. The visualization relies on D3’s data join to manage the dynamic list structure.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes