Skip to main content
100%

DecemberCafeChap2

✓ Published0🌍 Public
AAlsaxian
Last edited Nov 14, 2017
Created on Nov 14, 2017

This example demonstrates how D3’s data join can rebind HTML paragraphs to different data arrays. Three static <p> elements initially display Apple, Pear, and Banana. Using `d3.selectAll("p").datum(str)`, the text is briefly rewritten with a single string "France" and an index-based label. Then `p.data(dataset)` rebinds the paragraphs to an array of three French phrases, replacing the text with those values. The visualization shows how `.datum()` and `.data()` control the binding and rendering of text content in D3 v4.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes