Unable to import D3 funnel
sumedh908 opened this issue · 2 comments
Hi,
I am getting error in ES6 import for D3 funnel.
I have followed the process to load the d3 library in browser before importing d3-funnel.
Approach 1:
import * as d3 from '../jslibs/d3/d3'; import D3Funnel from 'd3-funnel';
Have a look at the following.
Approach 2:
I have also tried with
import * as D3Funnel from 'd3-funnel';
Hey there. Sorry for the late response.
Are you using a tool like Webpack to wire in the resources? The screenshots seem to indicate that you may be using ES6 directly in the browser without compilation, which is something I have never done before. If you are doing the latter, then it may be that the import will not work, as the output is UMD.
Can you recreate a simple repository showcasing this issue? I have created a quick repo myself showcasing the import of d3-funnel from npm. This is adapted from the examples page of this repo:
https://github.com/jakezatecky/d3-funnel-import-usage-issue-89
The repo above has since be deleted; if this is still an issue for you, feel free to open a new issue.
Hello. I am closing out this issue due to a lack of response. If you are still having an issue, feel free to reopen this.