🌍 Public
Viewing a saved revision (read-only)
c99d0dbf0e06408280cc4fbf8cf71a52
D3 Starter
This example demonstrates how to set up a simple D3 workflow by fetching asynchronous JSON data and rendering a filtered text report. It uses `getCars()` to return a promise that resolves a mock dataset of car listings after a two-second delay, then applies `generateReport()` with `Array.filter` and `Array.map` to select cars under a price threshold and format them into a readable list. The `index.html` includes D3 v7 from a CDN, and the final message is written to a `<pre>` element via `textContent`. The code also shows modular ES6 imports separating data access, formatting, and report generation.
AI-generated descriptionA demonstration of how to start using D3 version 6.