Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Partner
Partner

How to get the justGage plugin to work?

I'm trying to use the justGage (http://justgage.com/) plugin in an extension but can't get it to work.

This is my setup:

Scriptfile:

define( [
		"qlik", 
		"text!./template.html",
		"./js/raphael-2.1.4.min",
		"./js/justgage"
	],
	function ( qlik, template ) {

		return {
			template: template,
			support: {
				snapshot: true,
				export: true,
				exportData: false
			},
			paint: function () {
				return qlik.Promise.resolve();
			},
			controller: ['$scope', function ( $scope ) {
			    g = new JustGage({
					id: "gauge",
					value: 67,
					min: 0,
					max: 100,
					title: "Visitors"
				});
			}]
		};
	} );

Template:

<div qv-extension style="height: 100%; position: relative; overflow: auto;" class="ng-scope">
	<div id="gauge" class="200x160px"></div>
</div>

But as soon as I execute this code I get the following error message:

Skärmklipp.PNG

What am I doing wrong here?


Regards

1 Reply
Highlighted
New Contributor II

Re: How to get the justGage plugin to work?

Hello ,

You should try load the plug-in first in the define:

define( [
"./js/raphael-2.1.4.min",
"qlik",
"text!./template.html",
"./js/justgage"
]

or use raphael-amd  as a dependency -  https://github.com/Deep-Freeze/raphael-amd

Seems that a problem exists with that plug-in.

https://github.com/DmitryBaranovskiy/raphael/issues/524

BR,

Pedro