your favorite v4 curve interpolation demo, now with handy all
and none
selection buttons in the legend 🎉
this iteration also formats the x-axis tick labels as three-digit days of the year to resolve a label occlusion issue found with the default format, where 3/31
overplots it's neighbor 4/1
. can't have that, now can we?
var xAxis = d3.axisBottom(x)
.tickFormat(d3.timeFormat('%j'));
more on time formatting with d3 v4 https://github.com/d3/d3-time-format#locale_format
a fork of the bl.ock v4 curve interpolation comparison from @d3noob
README.md
:This bl.ock demonstrates the range of interpolation curves available in v4 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 4 of d3.js.
https://d3js.org/d3.v4.min.js