Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
peachman
Contributor III
Contributor III

How to import JS Libraries that are Depended of ether other.

Hi,

I am building a custom extension and require Chartjs to do so.

I have the following imports

define( [
        'jquery',
		'./PropertiesPannel',
		'//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js',
		'//cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js',
		'//cdn.jsdelivr.net/npm/chartjs-plugin-zoom@0.7.5/dist/chartjs-plugin-zoom.min.js'
    ],
    function ( $, ProperitesPannel, Chart) {
        'use strict';
....

 

I am getting the following Console error.

hammerjs.js:1 Uncaught SyntaxError: Unexpected token '<'
3setup-view.d91ae8b7669a979d2ec1.js:8 TypeError: Cannot read property 'helpers' of undefined
    at chartjs-plugin-zoom.min.js:11
    at Object.execCb (setup-view.d91ae8b7669a979d2ec1.js:8)
    at n.check (setup-view.d91ae8b7669a979d2ec1.js:8)
    at n.<anonymous> (setup-view.d91ae8b7669a979d2ec1.js:8)
    at setup-view.d91ae8b7669a979d2ec1.js:8
    at setup-view.d91ae8b7669a979d2ec1.js:8
    at each (setup-view.d91ae8b7669a979d2ec1.js:8)
    at n.emit (setup-view.d91ae8b7669a979d2ec1.js:8)
    at n.check (setup-view.d91ae8b7669a979d2ec1.js:8)
    at n.enable (setup-view.d91ae8b7669a979d2ec1.js:8)

 

I understand the the chartjs Plugin file requires the chart file and hammer. how can i get these linked up?  

Labels (4)
0 Replies