Cars Report
✓ Published0🌍 Public
This example demonstrates a simple asynchronous data-loading and report-generation workflow. It uses a static JSON array of five cars, each with a year, make, model, and price, loaded via a promise-based `getCars` function that simulates a two-second delay. After loading, the `generateReport` function filters cars under $2,000 and formats each as a text line using `formatCar`, with the result displayed in a `<pre>` element. The code highlights ES6 module imports, including local modules and Promise handling, without any visualization library.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed