jakezatecky/d3-funnel

FunnelGraph call fail

maristhek opened this issue · 2 comments

funnel-graph.js:147 Uncaught TypeError: Invalid attempt to spread non-iterable instance
at _nonIterableSpread (funnel-graph.js:147)
at _toConsumableArray (funnel-graph.js:145)
at FunnelGraph.createPercentages (funnel-graph.js:452)
at new FunnelGraph (funnel-graph.js:171)
at NewFunnel:59

What does this mean. Running sample code as described in README.md on .NET Core MVC

@page
@{
}

<script src="~/js/funnel-graph.js"></script> <script> var graph=new FunnelGraph({ container: '.funnel', gradientDirection: 'horizontal', data: [12000,5700,360], displayPercent: true, direction: 'horizontal' }); graph.draw(); </script>

Hello, this library's object D3Funnel, not FunnelGraph, which leads me to believe you are using a different library, or at least a library that has abstracted this component. In addition, those options do not align with the options of this library.

The code was cloned in a repo that looked almost the same as yours. Could have been from npmjs.
The clone fro github works as expected.