Skip to main content
100%

Nested Data Join for Each Parent Element but with Different Data

✓ Published0🌍 Public
MMinwoo Pak
Last edited Jul 26, 2021
Created on Jul 25, 2021
Forked from D3 Starter

This example demonstrates a nested data join where each parent table header element binds to a sub-array of data, creating child elements with different values. Using D3 v6’s `selectAll().data()` pattern, the code first joins `topData` to header cells, then re-joins each header’s `div.th-inner` with entries from `newData`. Child `div.th-but` elements are appended with checkboxes and spans, each bound to individual sub-data items, illustrating how to manage varying child data per parent.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes