JavaScript is a high-level programming language used by D3 projects. D3 adds methods to JavaScript, so existing language features remain available alongside D3's API. section 1.2.5
This practical introduction focuses on method chaining and object manipulation. Method chaining passes an updated object through successive calls, keeping ordered transformations concise and readable. section 1.2.5
d3.selectAll("div")
.append("p")
.attr("class", "my-class")
.text("Wow")
.append("span")
.text("Even More Wow")
.style("font-weight", "900");
Follow a D3 selection as it appends paragraphs and spans, assigns attributes and text, and applies styling through one readable chain. section 1.2.5
Object manipulation supplies the data-handling patterns used alongside D3:
- Index arrays, inspect their length, and test membership with includes(). section 1.2.5
- Read object properties with dot or bracket notation, including dynamically selected property names. section 1.2.5
- Transform, select, and search datasets with forEach(), map(), filter(), and find(). section 1.2.5











