Skip to main content
100%

Lets draw a bar chart

✓ Published1🌍 Public
MManousan
Last edited Jun 2, 2020
Created on Jun 2, 2020

This example visualizes employee salaries as horizontal bars, using a simple CSV dataset with names and monthly pay. The chart maps salary values to bar widths with a linear scale and names to vertical bands using d3.scaleBand, with d3.selectAll and .enter().append() creating SVG rectangles. d3.csv loads the data asynchronously, and numeric conversion happens before rendering. The SVG canvas is fixed at 800 by 600 pixels, with no axes or labels shown.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes