ICE 7 Reusable scatter plot
✓ Published0🌍 Public
This reusable scatter plot shows the relationship between study hours and exam scores, with each point representing a student’s performance. The D3.js component implements chainable accessors for configurable dimensions, margins, labels, and title, using `d3.scaleLinear`, `d3.extent`, `d3.axisBottom`, and `d3.axisLeft` to generate SVG axes. Data is loaded from a CSV file and rendered as green circles, demonstrating a modular approach to building interactive charts with d3.v7.
AI-generated descriptionReusable Scatter Plot
This project demonstrates a reusable scatter plot component built with D3.js that visualizes the relationship between study hours and exam scores.
Usage
- Create a CSV file named
scatter_data.csvwith the provided data - Import the
scatterPlotfunction fromscatterPlot.js - Configure the chart with your data and settings
- Call it on a D3 selection
Features
- Reusable chart component
- Automatic scaling of axes
- Configurable dimensions, margins, and labels
- Clean visualization of data points
MIT Licensed