🌍 Public
Viewing a saved revision (read-only)
a5d159e06b4245bfae2728c41d00570e
act_6_3Q
This example presents a scatter plot comparing battery capacity and range for electric vehicles, with data points colored by manufacturer. The chart uses D3.js to fetch a CSV file from GitHub, convert string values to numbers, and render the plot with axes and a legend. The visualization relies on D3’s `scaleLinear` for axes, `scaleOrdinal` for shapes, and `symbol` to draw each point, while `axisLeft` and `axisBottom` handle axis labels. The code also dynamically resizes the SVG to fit the window and includes a shape legend for the manufacturer categories.
AI-generated description