🌍 Public
Viewing a saved revision (read-only)
00b9a91b33ba406e85cf4ad89e7b48a8
Fork of Making A Bar Chart
This example shows the weights of ten animal species in a bar chart, with each bar representing a species from the provided CSV data. The x-axis displays species names with rotated labels, while the y-axis shows weight in kilograms. The code uses d3.csv to load data, d3.scaleBand for the categorical axis, d3.scaleLinear for the numeric axis, and d3.axisBottom and d3.axisLeft to render the axes. SVG rectangles are appended to the chart with steelblue fills, and margins are applied to position the visualization within the SVG canvas.
AI-generated description