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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_jespers_
Partner - Creator II
Partner - Creator II

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 (2)
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