Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
amassip
Helper I
Helper I

External libray permission refused

Hello,

I would like to add an external library ( from http://visjs.org/index.html#download_install ) so i followed the tutorial : create new external folder, add the js file inside and update the tsconfig.json.

In visual.ts I declare a global variable, because there is no d.ts file in the library, with this line :
declare var vis: any;

Then I want to call a function :

var items = new vis.DataSet([
                { id: 1, content: 'item 1', start: '2014-04-20' },
                { id: 2, content: 'item 2', start: '2014-04-14' },
                { id: 3, content: 'item 3', start: '2014-04-18' },
                { id: 5, content: 'item 5', start: '2014-04-25' }
            ]);

But if I go to the internet explorer's console i can see an error :

Permission denied

So what's wrong ?

 

I also tried with another library which has a d.ts but even with the declaration file i have the same error.

 

Thanks

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@amassip,

 

Based on my test, you could modify the .ts file as shown below.

		private window: any;

        constructor(options: VisualConstructorOptions) {
			this.window = window;

			var items = new this.window.vis.DataSet([
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
amassip
Helper I
Helper I

@v-chuncz-msft

 

Thanks you so much it works !

 

But how does the variable window work ?

v-chuncz-msft
Community Support
Community Support

@amassip,

 

Based on my test, you could modify the .ts file as shown below.

		private window: any;

        constructor(options: VisualConstructorOptions) {
			this.window = window;

			var items = new this.window.vis.DataSet([
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors