Spans Example
✓ Published0🌍 Public
CCurran Kelleher
Last edited Nov 22, 2016
Created on Nov 22, 2016
This example demonstrates a simple data binding and DOM manipulation with D3.js, displaying three name-value pairs as styled text spans. Each entry renders a bold name span, a colon separator, and an italic value span, populated from a hardcoded array of objects. The code uses `d3.select`, `selectAll`, `data`, and `enter().append()` to create the HTML `div` elements and their child `span` elements, while `attr` and `text` methods apply CSS classes and content. The visualization highlights D3’s declarative approach to generating structured text layouts without any interactive or animated features.
AI-generated descriptionBuilt with blockbuilder.org for mailing list discussion d3-js › Add class in .text().
mit Licensed