typescript - How to add an external library inside microsoft's power bi developer tools and export in pbiviz -


i trying create custom visualization inside powerbi using pykcharts.js. unable import file pykcharts.js dev tool's console. have tried passing cdn path this

/// <reference path="https://cdn.rawgit.com/akshayda04/powerbi-cdn/master/pykcharts/pykcharts.1.1.0.min.ts"/> 

as using typescript, not accepting it. there way include file , suggest me ways export file in pbiviz?

you achieve using jquery.getscript() method.

i tested , it's works fine withe power bi developer tools , custom visualisation. tried jquery.browser plugin this:

        $.getscript("https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.js", function( data, textstatus, jqxhr ) {            //now external scripts loaded. on use         }); 

and, after it's correctly loaded (so when jquery.getscript success callback invoked) use it, in example it's $.browser. need remember available after it's loaded. need adjust code wait before processing data , creating visualization. practice check if script isn't loaded (it isn't necessary download twice).

another, inelegant solution, copy , paste scripts want include dev tools (for example @ end of file).

i don't know if there other options recommended power bi team. can't find information it, maybe in future add functionality import scripts via reference.

i hope you. luck!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -