Can I use custom JavaScript and/or CSS inside QlikMaps?

Yes. QlikView does not natively allow user-inputted JavaScript to be executed, but there is a workaround provided by QlikMaps.

Simply add your custom JavaScript to the helperFunctions.js file, and call it wherever QlikView expects HTML.

Edit helperFunctions.js

You can add any custom JavaScript you want inside helperFunctions.js. It will then be available to use wherever QlikView will execute HTML/JavaScript.

Note: Inside a QlikMaps object, the only place you can execute your JavaScript is inside the Popup Text expression. This is a special expression that QlikView will evaluate not as a QlikView Expression but as HTML.

NOTE: Since you can add/edit CSS rules with JavaScript, helperFunctions.js can be used to add custom CSS as well as custom JavaScript.

Call inside Popup Text expression

Call inside Popup Text expression

This is how it would look to call myCustomFunction inside QlikView.

Setting custom CSS

You can directly edit CSS rules in 2 ways:

  1. Using native JavaScript functions, as detailed in this article
  2. Using jQuery, which is required within QlikView, as detailed in this article

It may be preferable to directly load an external CSS file rather than edit the rules inside JavaScript. You can do this in 2 ways:

  1. Using native JavaScript, as detailed in this article
  2. Using jQuery, as detailed in this article