benkeen / d3pie

A configurable pie chart lib and generator built on d3.js
MIT License
370 stars 203 forks source link

Uncaught ReferenceError: pie is not defined #141

Open patil-nileshb opened 6 years ago

patil-nileshb commented 6 years ago

https://github.com/benkeen/d3pie/blob/24b488a4f44226c407186c007365ab775f92a426/d3pie/d3pie.js#L1512 throws error Uncaught ReferenceError: pie is not defined at Object.maybeCloseOpenSegment (d3pie.js:1512) at Object.openSegment (d3pie.js:1490) at SVGGElement. (d3pie.js:1405) at SVGGElement. (d3.min.js:2)

tonyfumonkey commented 6 years ago

it still give error. PS: I use unminified version.

d3.v4.min.js:2 Uncaught Error at d3.v4.min.js:2 at Et.ease (d3.v4.min.js:2) at Object.openSegment (d3pie.min.js:1496) at SVGGElement.<anonymous> (d3pie.min.js:1408) at SVGGElement.<anonymous> (d3.v4.min.js:2)

which points to this line .ease(segments.effectMap[pie.options.effects.pullOutSegmentOnClick.effect])

panda-blue commented 5 years ago

it works better if you change pie with 'a'

maybeCloseOpenSegment: function () { d3.selectAll("." + a.cssPrefix + "expanded").size() > 0 && k.closeSegment(a, d3.select("." + a.cssPrefix + "expanded").node()) },

NB: it seems to me that examples works fine because the target DOM element is also name 'pie'