Canvas Line
✓ Published0🌍 Public
Mmbostock
Last edited Feb 25, 2018
Created on Dec 30, 2015
This example shows a step-shaped line chart of Apple’s daily closing stock prices from April 2007 to June 2008. The chart is rendered entirely to a Canvas element using the 2D context API, with scales from d3-scale and the line generator from d3-shape. Axes are drawn manually with Canvas path and text methods rather than SVG. Data is loaded from a TSV file using d3-fetch, and the curve is defined with `d3.curveStep`.
AI-generated descriptionA line chart rendered to Canvas using d3-shape.
gpl-3.0 Licensed