D3 - Grouping

Card Puncher Data Processing

About

Subselecting via selectAll groups elements by ancestor.

Thus:

  • d3.selectAll(“p”).selectAll(“b”) groups by paragraph, while
  • d3.selectAll(“p b”) returns a flat selection.

Subselecting via select is similar, but preserves groups and propagates data.







Share this page:
Follow us:
Task Runner