Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
Ddtdenver
Last edited Oct 27, 2019
Created on Oct 26, 2019

This example demonstrates the process of building a bar chart from scratch, beginning with an empty SVG element and then programmatically adding bars and axes. The code uses the D3 v5 library’s `select` function to target the `svg` element and reads its `width` attribute to establish chart dimensions. Rendering is done entirely in SVG, with the page’s layout set to a full-bleed canvas via the `styles.css` file. The example includes a linked video tutorial that explains each step, making it useful for learning fundamental D3 data-binding and shape-generation patterns.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes