Cars Report
✓ Published0🌍 Public
This example demonstrates a simple text-based report generated from a hardcoded JSON array of four cars with attributes for year, make, model, and price. It filters the cars to show only those priced under $2,000, using a local ES6 module (`generateReport`) that maps and joins the formatted strings. The code loads D3 via UNPKG for general use, but the report itself relies on native JavaScript promises and `setTimeout` in `getCars` to simulate asynchronous data fetching, then updates the DOM by setting the `textContent` of an HTML `<pre>` element.
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