Skip to main content
100%

v7 curve interpolation comparison

✓ Published0🌍 Public
Aackuser
Last edited Jun 18, 2021
Created on Mar 6, 2023

This visualization compares eight d3.js v7 interpolation curves—including linear, step, basis, cardinal, monotoneX, and Catmull-Rom—by rendering the same time-series dataset (stock closing prices from April to May 2012) as overlapping SVG line paths. Each curve is drawn with a distinct color and labeled in a legend; clicking a label toggles the corresponding line’s opacity with a transition. The chart also includes scatterplot circles for the raw data points and uses d3.axisBottom and d3.axisLeft for the time and value scales.

AI-generated description

This bl.ock demonstrates the range of interpolation curves available in v7 of d3.js.

You can click on any of the legend labels to toggle visibility of the lines.

Details of the curve can be found on the D3 wiki.

This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 7 of d3.js.

mit Licensed

Similar vizzes