Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extension not loading JS file

I'm developing a Qlik Sense extension that uses D3.js and DataMaps.

The problem is that when I try to load the scripts, the one corresponding to datamaps is not loaded.

The error raised is (it is obvious that the js file is not loaded properly):

error.PNG

However, if I use the same instructions in a HTML file, it works.

My code is the following:

map.PNG

2 Replies
mgranillo
Specialist
Specialist

I would try saving the code locally with the extension.

Then reference as ...,"./datamaps.world.min.js",...

Mike

ErikWetterberg
Master
Master

Hi Alex,

I haven't tested this, but you could try to change on line 35 to new Datamap, since datamaps seems to define window.Datamap, but perhaps does not return a requirejs module.

Also note that you do not create the element with the 'container_'... id, you need to add that to $element.

Hope this helps

Erik