Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Rrudrachauhan11
Last edited Apr 12, 2023
Created on Apr 12, 2023
Forked from HTML Starter

This example shows a simple bar chart comparing the scores of four people—Simon, Mary, Jo, and Peter—on a scale from 0 to 100. It uses d3.scaleBand and d3.scaleLinear to map data to positions, with blue SVG rectangles drawn via d3.selectAll and data joins. The chart includes custom x and y axes built with d3.axisBottom and d3.axisLeft, labeled with names and numeric ticks. Rendering uses SVG within an 800-by-400 viewBox, with margins applied around the plot area.

AI-generated description
MIT Licensed

Similar vizzes