🌍 Public
Viewing a saved revision (read-only)
0ef68d3aa37d4116b4bc848c1e1872f6
Nested Data Join for Each Parent Element but with Different Data
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 descriptionA demonstration of how to start using D3 version 6.