Skip to main content
100%

D3 Page Template

✓ Published0🌍 Public
RRona Xu
Last edited Dec 20, 2021
Created on Dec 11, 2021
Forked from HTML Starter

This example demonstrates a simple SVG line chart template using D3.js, where a red polyline connects six data points across a 500x400 canvas. The visualization shows a basic yet effective pattern for plotting series data, with points positioned at varying y-coordinates to create a descending then ascending trend. The code relies on D3 v7 loaded via CDN and constructs the line using an SVG path element with the `d` attribute, specifying coordinates through a path string. The `stroke` and `stroke-width` attributes control the visual styling, while `fill="none"` keeps the area under the curve transparent. This serves as a minimal starting template for building more complex D3 visualizations in plain HTML.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes