Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Report

Public visualization

Cars Report

0 stars0🌍 Public
Bbenroston
Last edited Apr 29, 2023
Created on Apr 29, 2023
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed