Skip to main content
100%

act3_q1

✓ Published0🌍 Public
Pp99vijaya@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This example visualizes the relationship between horsepower and weight for five car models using a scatter plot. The data is hard-coded as an array of JavaScript objects, mapping each car's horsepower to the x-axis and weight to the y-axis. Built with D3 v7, it renders SVG circles whose positions are determined by linear scales (`d3.scaleLinear`), and their fill colors are mapped via a sequential plasma color scale based on horsepower. The chart includes labeled axes and uses D3’s axis functions for tick marks.

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.
MIT Licensed

Similar vizzes