jakezatecky / d3-funnel

A JavaScript library for rendering funnel charts using the D3.js framework.
http://jakezatecky.github.io/d3-funnel/
MIT License
330 stars 98 forks source link

Require/Define d3.js #65

Closed balexbyrd closed 8 years ago

balexbyrd commented 8 years ago

I'm having an issue with the require/define statement. In Qlik Sense, the funnel shows up just fine with no errors, in a mashup I'm having an issue loading d3.js from the url that is generated from the define statement. When I comment or change the define line, it no longer works in QS (and still doesn't work in Mashup).

Any way to just force the d3.js to load? Any help? Thanks in advance this is fantastic

QS Works: image

Error received in mashup: image

image

balexbyrd commented 8 years ago

I figured it out. Qlik calls define() in a mashup and the code below is required (pun intended) right before the mashup define to point to the right d3.js file.

When define(["d3"], factory) is called it then points to the CDN below.

require.config( { paths: { d3: "//cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3" } });

jakezatecky commented 8 years ago

That's good. Note that I do not have that much familiarity with Qlik. Obligatory mention of the Qliksense plugin:

https://github.com/stefanwalther/sense-funnel-chart

balexbyrd commented 8 years ago

No worries mate, that extension you posted is using a version of your funnel from back in the day. I started with that and it required updating which leads me here. Thanks again - great work