Line with Missing Data
✓ Published0🌍 Public
深深度碎片
Last edited Aug 6, 2016
Created on Aug 4, 2016
This example demonstrates how a line chart handles missing data points by breaking the line into segments. The visualization plots a sine wave–like curve across 40 evenly spaced samples, where every fifth data point is null, causing the line to skip those gaps. The chart uses D3 v4’s `d3.line()` with a `.defined()` accessor to filter null values, while circles mark the valid points. The SVG rendering includes axes via `d3.axisBottom` and `d3.axisLeft`, with the data generated procedurally using `d3.range()` and `Math.sin`.
AI-generated descriptionA demonstration of line.defined.
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/0533f44f2cfabecc5e3a'>Line with Missing Data</a>
gpl-3.0 Licensed