<?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 Adding D3 support to a custom visual project in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/135223#M4655</link>
    <description>&lt;P&gt;All the Microsoft documentation and samples about adding D3 typed definition files to a custom visual project use the &lt;STRONG&gt;typings&lt;/STRONG&gt; utility. Here is what the instructions are on the Power BI Visuals repo in GitHub:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# First,&amp;nbsp;install D3 v3.5.5 because Power BI does not yet support D3 v4&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3.5.5 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings utility&lt;BR /&gt;&lt;STRONG&gt;npm install typings -g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings files for D3&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#ff0000"&gt;&amp;lt;- Error as it attempts install D3 v4 typings file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# In the GitHub issues list for the repo, I found that workaround that&amp;nbsp;works&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3#0.0.0+20160907005744&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While you can get this to work, I think it is safe to say the &lt;STRONG&gt;typings&lt;/STRONG&gt; utility is now being phased out in general node.js and npm development and developers are now standardizing on using the regular &lt;STRONG&gt;npm install&lt;/STRONG&gt; command to install typed definition files from the Definitely Typed project. Another important concern is that soon you will no longer be able to sit at the cool kids table if you keep using th &lt;STRONG&gt;typings&lt;/STRONG&gt; utility &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the steps that I think should start using to create a new custom visual project with support for D3 programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pbiviz new barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;cd barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3 --save&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install @types/d3@3 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have one that,&amp;nbsp;modify the &lt;STRONG&gt;externalJS&lt;/STRONG&gt; setting in &lt;STRONG&gt;pbiviz.json&lt;/STRONG&gt; file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"externalJS": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; "node_modules/d3/d3.js"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then update the&amp;nbsp;&lt;STRONG&gt;files&lt;/STRONG&gt; section of the &lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt; file.&lt;BR /&gt;&lt;STRONG&gt;"files": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".api/v1.5.0/PowerBI-visuals.d.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "src/visual.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "node_modules/@types/d3/index.d.ts"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It use to take me a while to configure all this and now it takes less than a minute.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 19:34:00 GMT</pubDate>
    <dc:creator>TedPattison</dc:creator>
    <dc:date>2017-03-01T19:34:00Z</dc:date>
    <item>
      <title>Adding D3 support to a custom visual project</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/135223#M4655</link>
      <description>&lt;P&gt;All the Microsoft documentation and samples about adding D3 typed definition files to a custom visual project use the &lt;STRONG&gt;typings&lt;/STRONG&gt; utility. Here is what the instructions are on the Power BI Visuals repo in GitHub:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# First,&amp;nbsp;install D3 v3.5.5 because Power BI does not yet support D3 v4&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3.5.5 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings utility&lt;BR /&gt;&lt;STRONG&gt;npm install typings -g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings files for D3&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#ff0000"&gt;&amp;lt;- Error as it attempts install D3 v4 typings file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# In the GitHub issues list for the repo, I found that workaround that&amp;nbsp;works&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3#0.0.0+20160907005744&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While you can get this to work, I think it is safe to say the &lt;STRONG&gt;typings&lt;/STRONG&gt; utility is now being phased out in general node.js and npm development and developers are now standardizing on using the regular &lt;STRONG&gt;npm install&lt;/STRONG&gt; command to install typed definition files from the Definitely Typed project. Another important concern is that soon you will no longer be able to sit at the cool kids table if you keep using th &lt;STRONG&gt;typings&lt;/STRONG&gt; utility &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the steps that I think should start using to create a new custom visual project with support for D3 programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pbiviz new barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;cd barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3 --save&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install @types/d3@3 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have one that,&amp;nbsp;modify the &lt;STRONG&gt;externalJS&lt;/STRONG&gt; setting in &lt;STRONG&gt;pbiviz.json&lt;/STRONG&gt; file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"externalJS": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; "node_modules/d3/d3.js"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then update the&amp;nbsp;&lt;STRONG&gt;files&lt;/STRONG&gt; section of the &lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt; file.&lt;BR /&gt;&lt;STRONG&gt;"files": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".api/v1.5.0/PowerBI-visuals.d.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "src/visual.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "node_modules/@types/d3/index.d.ts"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It use to take me a while to configure all this and now it takes less than a minute.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 19:34:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/135223#M4655</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2017-03-01T19:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding D3 support to a custom visual project</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/136117#M4686</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/2834"&gt;@TedPattison&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sharing the information. You could also take a look at &lt;A href="https://community.powerbi.com/t5/Developer/Adding-a-static-js-script-to-a-custom-visualization/td-p/104957" target="_self"&gt;this thread&lt;/A&gt; to add an external library.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 03:27:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/136117#M4686</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-03T03:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding D3 support to a custom visual project</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/305879#M9001</link>
      <description>&lt;P&gt;Thanks for sharing. Last month your instructions worked like a charm. This month, &lt;STRONG&gt;npm install d3@3 --save&lt;/STRONG&gt;&amp;nbsp;throws an error although &lt;STRONG&gt;npm install @types/d3@3 --save&lt;/STRONG&gt; works fine. Even when I copy across the d3 folder I created this way to my new folder, it won't work. I wonder if support has been removed for d3 version 3 with npm, and whether you could update your excellent instructions accordingly.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 15:14:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/305879#M9001</guid>
      <dc:creator>vizdata</dc:creator>
      <dc:date>2017-11-17T15:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding D3 support to a custom visual project</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/307911#M9071</link>
      <description>&lt;P&gt;Installation of d3@3 works well for me.&lt;/P&gt;&lt;P&gt;What npm and nodejs versions do you use? What kind of error have you faced?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Tue, 21 Nov 2017 14:37:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-D3-support-to-a-custom-visual-project/m-p/307911#M9071</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-11-21T14:37:08Z</dc:date>
    </item>
  </channel>
</rss>

