Skip to main content
100%

Cars Report

✓ Published0🌍 Public
Iilsan142
Last edited Oct 28, 2022
Created on Oct 25, 2022
Forked from D3 Starter

This example demonstrates a simple asynchronous data-loading pattern: it fetches an in-memory array of car objects through `getCars()`, which returns a Promise after a simulated 2-second delay. While waiting, the page displays “Loading...”, then renders a filtered text report listing only cars priced under $2,000, formatted as “year make model: price” via `generateReport()` and `formatCar()`. The code uses D3 v7’s `select` import and vanilla DOM methods to update a `<pre>` element, showcasing how to combine Promises with D3 for dynamic content updates.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes