🏠 back to Observable

D3: d3.line outside of svg

#1

I may want to use d3-line outside of svg, and explore basics first. First I want to get the path string by just calling line(data): https://runkit.com/embed/r8n0iyafsrzx
It works for the default line but if add a non-default curve factory, there is an error: curve is not a function. I must be doing something basic wrong ?

The background is essentially this issue: https://github.com/d3/d3-shape/issues/124
related: Obtain interpolated y-values without drawing a line

#2

https://runkit.com/embed/esc2msluj7az

has the corrected code. line.curve takes the function to evaluate.