Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

b80b1117eb5c437bb7319cfa2060f505

Making a Bar Chart

0 stars4🌍 Public
Cchristoshanes
Last edited Mar 30, 2019
Created on Mar 30, 2019

This example demonstrates how to build a basic bar chart using D3.js, rendering bars as SVG rectangles filled with steelblue. The visualization starts with an empty SVG canvas and establishes its dimensions by reading the width and height attributes directly from the SVG element. It uses D3 v5's `select` function to access the SVG container, with the data and bar positions left unwritten in the visible code. The styling applies a font size to text elements and removes page margins for a clean, full-window display.

AI-generated description