Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jesper_snihs
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

Labels (5)
1 Reply
PedroCunha
Contributor II
Contributor II

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