Skip to main content
100%

Fork of Making A Bar Chart

✓ Published0🌍 Public
HHaili0109
Last edited Nov 26, 2024
Created on Nov 26, 2024
Forked from 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
MIT Licensed

Similar vizzes