D3 Page Template
✓ Published0🌍 Public
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 descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed