Skip to main content
100%

task2q

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

This scatter plot visualizes the relationship between Horsepower and MPG for various car brands, with each point colored by its brand. The visualization loads car data from a CSV file hosted on GitHub, parses it with `d3.csv`, and maps values to screen coordinates using `d3.scaleLinear` for both axes. Points are rendered as SVG circles with `d3.selectAll`, and a legend is generated using `d3.scaleOrdinal` with `d3.schemeSet1`. Axis labels are added via `d3.axisBottom` and `d3.axisLeft`, with the SVG container created using standard D3 selection and attribute methods.

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