<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding a static js script to a custom visualization in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/329721#M9756</link>
    <description>&lt;P&gt;Update (12.27.2017) you now declare external libraries in "externalJS" section of pbiviz.json&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2017 23:03:46 GMT</pubDate>
    <dc:creator>tylersbrown01</dc:creator>
    <dc:date>2017-12-27T23:03:46Z</dc:date>
    <item>
      <title>Adding a static js script to a custom visualization</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/104957#M3638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have followed the instructions on this page:&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md" target="_self"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md&lt;/A&gt;, i.e.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Created a folder&lt;STRONG&gt; external&lt;/STRONG&gt; in the viz. folder (same level as e.g.&lt;STRONG&gt; src&lt;/STRONG&gt; and &lt;STRONG&gt;style&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;*&amp;nbsp;Copied my wanted library to this new folder (&lt;STRONG&gt;./external/d3.v4.min.js&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;* Added the corresponding line to &lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt;, resulting in&lt;/P&gt;&lt;PRE&gt;{
  "compilerOptions": {
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "ES5",
    "sourceMap": true,
    "out": "./.tmp/build/visual.js"
  },
  "files": [
    ".api/v1.3.0/PowerBI-visuals.d.ts",
    "src/visual.ts",
    "external/d3.v4.min.js"
  ]
}&lt;/PRE&gt;&lt;P&gt;However, I still get the compilation error "Cannot find name `d3`".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to use npm or typings (and as I understand from&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md" target="_self"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md&lt;/A&gt;&amp;nbsp;that should not be necessary for loading external libraries).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing? Do I have to load it explicitly in &lt;STRONG&gt;src/visual.ts&lt;/STRONG&gt; in some way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 10:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/104957#M3638</guid>
      <dc:creator>AF</dc:creator>
      <dc:date>2016-12-21T10:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a static js script to a custom visualization</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/18803"&gt;@AF&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on my test, you could add a &lt;EM&gt;let&lt;/EM&gt; statement as shown below.&lt;/P&gt;&lt;PRE&gt;let d3 = (&amp;lt;any&amp;gt;window).d3;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2016 09:35:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2016-12-22T09:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a static js script to a custom visualization</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105434#M3662</link>
      <description>&lt;P&gt;Thanks, that worked perfectly!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 09:51:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105434#M3662</guid>
      <dc:creator>AF</dc:creator>
      <dc:date>2016-12-22T09:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a static js script to a custom visualization</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/329721#M9756</link>
      <description>&lt;P&gt;Update (12.27.2017) you now declare external libraries in "externalJS" section of pbiviz.json&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 23:03:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/329721#M9756</guid>
      <dc:creator>tylersbrown01</dc:creator>
      <dc:date>2017-12-27T23:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a static js script to a custom visualization</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/330322#M9787</link>
      <description>&lt;P&gt;Yeah, that's correct.&lt;/P&gt;&lt;P&gt;JavaScript code must be included into&amp;nbsp;&lt;SPAN&gt;externalJS property of pbiviz.json.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Ignat Vilesov,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 07:48:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/330322#M9787</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-12-29T07:48:47Z</dc:date>
    </item>
    <item>
      <title>Adding a chart libary to a custom visualisation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/2263628#M33714</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to call the nivo react chart library in the powerbi react visual. I also have seen the documentation. there, they said, you can't call the external js file in the powerbi api 3.0. or above. Any of the way to use react chart library with the latest powerbi library. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 13:39:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/2263628#M33714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T13:39:57Z</dc:date>
    </item>
  </channel>
</rss>

