Closed Steve-Mc closed 8 years ago
That looks reasonable. Unfortunately without seeing the complete environment you are using, it’s impossible to say where things could be going wrong. I suggest posting a minimal test case to bl.ocks.org and then asking on Stack Overflow for help. Good luck.
I had the same problem. Could import everything else fine, but not line from the shape module.
What I did, which i'm not sure why it worked, was do:
import * as d3Line from 'd3-shape'
then call
d3Line.line()
instead of importing the functions individually.
@Motoxpro d3Line
is undefined in my case. I'm building with Rollup
import { line } from 'd3-shape';
should work fine.
Any chance you could post a full example so others could reproduce the error?
My mistake, Githubissues.
I am importing line from
d3-shape
:and attaching it to a d3 constant:
However I am getting
d3.line is not a function
when callingd3.line()
.I am able to import from
d3-selection
,d3-array
,d3-scale
andd3-axis
just fine. Has anyone else experienced this issue?