Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Making A Bar Chart

Public visualization

Viewing a saved revision (read-only)

19bb3aa2974140728441cb46a7e50cee

Fork of Making A Bar Chart

0 stars0🌍 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