<?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: Including other JavaScript libraries in custom visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Including-other-JavaScript-libraries-in-custom-visual/m-p/221768#M6999</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36706"&gt;@callum&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the solution below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2017 02:31:58 GMT</pubDate>
    <dc:creator>v-chuncz-msft</dc:creator>
    <dc:date>2017-07-31T02:31:58Z</dc:date>
    <item>
      <title>Including other JavaScript libraries in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Including-other-JavaScript-libraries-in-custom-visual/m-p/220961#M6974</link>
      <description>&lt;P&gt;Could someone please explain how this is done? I want to use the d3 library but I don't know how to actually use it from within my visual.ts file. I've installed it with npm and added it to the externalJS part of pbiviz.json, is there anything else I need to configure before I can include and use it in visual.ts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I add&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import * as d3 from "../node_modules/d3";&lt;/PRE&gt;&lt;P&gt;to the top of visual.ts then I get the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/52230iE502DEE45291C720/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've also tried just&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import * as d3 from "d3";&lt;/PRE&gt;&lt;P&gt;to no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked through the source of &lt;A href="https://github.com/Microsoft/PowerBI-visuals-sampleBarChart" target="_self"&gt;the example custom visual&lt;/A&gt;&amp;nbsp;but couldn't actually find any kind of importing/including... In barchart.ts they just start using d3 straight away, which is a bit confusing. When I try that I get:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 539px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/52236iAAFC980F77779103/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please show me what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 09:22:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Including-other-JavaScript-libraries-in-custom-visual/m-p/220961#M6974</guid>
      <dc:creator>callum</dc:creator>
      <dc:date>2017-07-28T09:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Including other JavaScript libraries in custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Including-other-JavaScript-libraries-in-custom-visual/m-p/221768#M6999</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36706"&gt;@callum&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the solution below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/m-p/105424#M3659&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 02:31:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Including-other-JavaScript-libraries-in-custom-visual/m-p/221768#M6999</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-07-31T02:31:58Z</dc:date>
    </item>
  </channel>
</rss>

