Skip to main content
100%

Re-create curved lines

✓ Published0🌍 Public
QQ-Zhao
Last edited Sep 23, 2017
Created on Sep 23, 2017

Three line charts demonstrate D3's curve interpolation methods. The first uses a straight line between two points, while the second and third apply `d3.curveCardinal` to smooth paths through four and five data points respectively. Each path is rendered as an SVG `path` element with black stroke and no fill, using `d3.line()` with custom x and y scales that multiply coordinates by five and invert y-values. The three panels are positioned side by side at increasing offsets on the x-axis.

AI-generated description

Built with blockbuilder.org

This figures are re-production of 1 straight and 2 curved lines.

This bar chart was forked from <a href='https://bl.ocks.org/emmasaunders'>Viz Data Ltd</a>'s block: <a href='http://bl.ocks.org/emmasaunders/c25a147970def2b02d8c7c2719dc7502'>Interpolation(v4)</a>.

mit Licensed

Similar vizzes