act_6_3Q
✓ Published0🌍 Public
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 descriptionMIT Licensed