Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 selections

Public visualization

Viewing a saved revision (read-only)

46f55d110fb743fb80064223279ada75

D3 selections

0 stars0🌍 Public
KKaustav Sen
Last edited Jun 27, 2021
Created on Jun 27, 2021
Forked from HTML Starter

This example demonstrates D3’s selection and data-join mechanism. It maps an array of five numbers to paragraph elements, appending each value as text. Paragraphs whose data values exceed 15 are then filtered and styled with red, bold text using D3's `.filter()` method. The code uses `d3.select`, `.selectAll`, `.data`, `.enter()`, and `.append()` to bind the array and create the DOM nodes, with styling applied via `.style()`.

AI-generated description