Skip to main content
100%

27. D3 Bar Chart Teal

✓ Published1🌍 Public
Aamakanju@nyit.edu
Last edited Feb 12, 2026
Created on Feb 9, 2026

This bar chart displays a static dataset of 20 numeric values, rendered as teal-colored rectangles in an SVG container. The code uses D3.js version 4.5.0 to bind the array of numbers to SVG `rect` elements, calculating each bar’s x-position, width, and height based on the dataset length and value. The bars are vertically scaled by a factor of 4, with a 1-pixel padding between them. The chart does not include axes, labels, or interactivity, focusing solely on the basic bar-encoding technique.

AI-generated description
MIT Licensed

Similar vizzes