Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using the qlik sense extension editor in the cloud to create a d3 extension, and have put the d3 code in a local file, linking to it through the define statement at the top of the extension editor. This seems to work fine for d3.v3, but not for d3.v4. The console tells me that d3 is undefined.
Is there a way around this? Any help appreciated.
Thanks
Sarah
What does your definiera statement look like? Do you get any other errors, like HTTP errors in the console?
Erik Wetterberg
I had the same issue and here is what I've done to solve it
With v4, you have to put d3 as parameter of your function.
In your main.js file you have to declare d3 in your parameters likes this :
define( [
"./lib/d3",
"./lib/myfunctions"
],
function ($, d3 ) {
'use strict';
...
// call of method from functions
mymethod(param1, param2, d3);
In the myfunctions.js
function mymethod(param1, param2, d3){
d3.select....
}