Skip to main content
100%

D3 Page Template

✓ Published0🌍 Public
AAn Jingyi
Last edited Apr 29, 2020
Created on Apr 29, 2020
Forked from HTML Starter

This example uses D3 v5 to render a simple bar chart. It creates an SVG canvas of 300 by 300 pixels, then defines a dataset of six numeric values. The code selects the SVG element, binds the data to it, and appends rectangles with widths proportional to the data values. Each rectangle’s height is fixed at 30 pixels minus a small gap, and its y-position is offset by index. The bars are uniformly colored steel blue. The rendering is purely SVG-based, using `d3.select`, `.append`, `.data`, and `.enter` to construct and position the bars.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes