Skip to main content
100%

Fork of reusable Fork of Scatter Plot - ICE7

✓ Published1🌍 Public
Jjanisha30gowda@gmail.com
Last edited Oct 24, 2025
Created on Oct 24, 2025

This scatter plot visualizes the relationship between vehicle weight and horsepower using a synthetic dataset of 100 cars. The chart uses D3.js v7 with a reusable `scatterPlot()` function component, rendered as an SVG. The x-axis represents weight in pounds, while the y-axis shows horsepower, with each car plotted as a semi-transparent steel-blue circle. The code demonstrates D3's modular design by using method chaining with `.data()`, `.x()`, `.y()`, and label setters, along with `d3.scaleLinear()` for axis scaling and `d3.axisBottom()` and `d3.axisLeft()` for tick marks.

AI-generated description
MIT Licensed

Similar vizzes