<?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: How to ensure latest version of d3 in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2770041#M5192</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;I am not completely sure, but I think the current framework supports only up to d3 v5. The steps in the &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=windows#install-development-libraries" target="_self"&gt;official documentation&lt;/A&gt; also mention installing d3 v5.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shannnonpereira_0-1663236558927.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784353iCB54ADB0D71DCDB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shannnonpereira_0-1663236558927.png" alt="shannnonpereira_0-1663236558927.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can try getting in touch with the custom visual team via email to verify this. They are always responsive and super helpful!&lt;/P&gt;&lt;P&gt;pbicvsupport@microsoft.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 10:10:48 GMT</pubDate>
    <dc:creator>shannnonpereira</dc:creator>
    <dc:date>2022-09-15T10:10:48Z</dc:date>
    <item>
      <title>How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2768120#M5187</link>
      <description>&lt;P&gt;I am currently trying to build a Power BI custom viz.&lt;/P&gt;
&lt;P&gt;I have followed the steps listed&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=windows" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;. While installing d3 from&amp;nbsp;&lt;A href="https://www.npmjs.com/package/d3" target="_self"&gt;npm&lt;/A&gt;&amp;nbsp;, on the terminal I used&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;npm i d3 --save&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;instead of doing it this way&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;npm i d3@^5.0.0 --save&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as instructed&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=windows" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1663181674410.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/783795i644851001FF7265A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1663181674410.png" alt="smpa01_0-1663181674410.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, I see this within `package-lock.json` file -&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;"version"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"5.12.0"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_1-1663181964074.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/783796iC36A099544262BF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_1-1663181964074.png" alt="smpa01_1-1663181964074.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am not sure what it means. But I want to make sure that all my custom viz uses d3 v7.&amp;nbsp; Cause the HTML I have created are all using d3 v7.&lt;/P&gt;
&lt;P&gt;Is there any way for me to ensure that while building,&amp;nbsp;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_self"&gt;pbiviz&lt;/A&gt;&amp;nbsp; always includes the latest version of d3(assuming it is not doing that currently, I can be completely wrong)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 19:10:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2768120#M5187</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-09-14T19:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2770041#M5192</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;I am not completely sure, but I think the current framework supports only up to d3 v5. The steps in the &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/environment-setup?tabs=windows#install-development-libraries" target="_self"&gt;official documentation&lt;/A&gt; also mention installing d3 v5.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shannnonpereira_0-1663236558927.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784353iCB54ADB0D71DCDB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shannnonpereira_0-1663236558927.png" alt="shannnonpereira_0-1663236558927.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can try getting in touch with the custom visual team via email to verify this. They are always responsive and super helpful!&lt;/P&gt;&lt;P&gt;pbicvsupport@microsoft.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 10:10:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2770041#M5192</guid>
      <dc:creator>shannnonpereira</dc:creator>
      <dc:date>2022-09-15T10:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2770539#M5193</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/398647"&gt;@shannnonpereira&lt;/a&gt;&amp;nbsp; I really don't think that is the case.&lt;/P&gt;
&lt;P&gt;d3V7 was utilized&amp;nbsp;&lt;A href="https://nonodename.com/post/pbid3zoom/" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Screenshot from the above link&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1663248611678.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784508iA2E03D67CE628BC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1663248611678.png" alt="smpa01_0-1663248611678.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp; can you please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still see this in package.json&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1663246961519.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784477i128B87CDDAB813DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1663246961519.png" alt="smpa01_0-1663246961519.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:30:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2770539#M5193</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-09-15T13:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771743#M5195</link>
      <description>&lt;P&gt;If you want to automatically upgrade your packages, you'll probably need to set up some kind of npm script to do this, however, this goes against the point of why your&amp;nbsp;&lt;FONT face="courier new,courier"&gt;package.json&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;package-lock.json&lt;/FONT&gt; are there. These are to ensure that you package and build your visual with the versions of the libraries you intend to use, that you can guarantee stability between updates of your visual, and that you can upgrade these when you are ready to do so. I personally rely on this mechanism, so it's not something I'd been keen to explore, as I want to test any major package updates before I apply them to a production build of my visual.&lt;/P&gt;
&lt;P&gt;For instance, if you arbitrarily upgrade your packages from D3 v5 to v7 just because you want to, there are a &lt;A href="https://github.com/d3/d3/blob/main/CHANGES.md" target="_self"&gt;whole bunch of changes&lt;/A&gt; that get introduced and some of them are breaking changes. You would need to isolate these in your code and fix up, and can hinder the build process. There are whole articles out there dedicated to migrating your codebase from one version of D3 to the next. I'd personally only update a package if there are features I need, and I can accept the costs of refactoring my code to suit or a security update necessitates it.&lt;/P&gt;
&lt;P&gt;If you're sure that your visuals that use D3 v5 have no breaking changes you could just run &lt;FONT face="courier new,courier"&gt;npm i d3@latest&lt;/FONT&gt; in your project's root folder, or manually update the entry in your package.json to the version you want, save the file and run &lt;FONT face="courier new,courier"&gt;npm i&lt;/FONT&gt; to update everything.&lt;/P&gt;
&lt;P&gt;If you want more rounded advice, then this might be a better question to post in a community dedicated to node.js and JavaScript, as this is more of an architecture issue than a Power BI visuals issue. Similarly, &lt;A href="https://docs.npmjs.com/about-semantic-versioning" target="_self"&gt;this article may help you&lt;/A&gt; with finding the right semantic versioning to use for any such packages to ensure that they stay up to date (at least for minor and service releases).&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 22:20:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771743#M5195</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2022-09-15T22:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771869#M5196</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for the response.&amp;nbsp; There are&amp;nbsp; few things I need to clarify here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have not yet built a single power bi custom visual using &lt;STRONG&gt;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_blank" rel="noopener"&gt;powerbi-visuals-tools&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;. But I want to as I have gotten somewhat comfortable with d3.js&amp;nbsp; and built visuals exactly as any other d3 aspirant&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would do by creating doc.html+index.js+style.css files in VS Studio Code. Now that I have built some visuals using d3 which once used to be my imagination, I want to see how can I utilize&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_blank" rel="noopener"&gt;powerbi-visuals-tools&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;to convert them into a custom viz. All my d3 visuals (doc.html+style.css+index.js) were developed using d3v7.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a first step, to build power bi custom viz I downloaded&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_blank" rel="noopener"&gt;powerbi-visuals-tools&lt;/A&gt;&amp;nbsp;and my expectation was that it would return package.json with d3v7. I can also see that this person&amp;nbsp;&lt;A href="https://nonodename.com/post/pbid3zoom/" target="_blank" rel="noopener"&gt;here&lt;/A&gt; got d3v7 with&amp;nbsp;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_blank" rel="noopener"&gt;powerbi-visuals-tools&lt;/A&gt;.&amp;nbsp;&lt;/STRONG&gt;Which is why I am trying to understand why&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://www.npmjs.com/package/powerbi-visuals-tools" target="_blank" rel="noopener"&gt;powerbi-visuals-tools&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;does not return a package.json that has the latest version of d3 (which is v7 in this case). I see this and I am guessing it means the project will be utilizing d3's&amp;nbsp;5.16.0 version. In my case, the .html I wrote in VS studio code utilizes d3v7's d3.event which was completely different in d3v5.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1663288703072.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784853i1E2200C6CBDBEFA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1663288703072.png" alt="smpa01_0-1663288703072.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So I guess, the wording in my question was wrong. I don't always want to ensure the latest version of d3, rather I want to ensure using the same version of d3 as my&amp;nbsp;doc.html is currently using.&lt;/P&gt;
&lt;P&gt;My question is how do I do that? You have already provided me with two options as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;run npm i d3@latest in your project's root folder, or manually update the entry in your package.json to the version you want, save the file and run npm i to update everything&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I do any of the above and it brings d3v7 are there any chances that any other parts of the custViz folder will break due to this update? I don't have any prior experience with npm, hence, I have so much confusion and questions.&amp;nbsp; I am still in the preliminary stage of building and I don't want to go deep without knowing these components first only to discover myself in tangling trouble later.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_1-1663288753910.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/784854i7D5DB4E1293D7886/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_1-1663288753910.png" alt="smpa01_1-1663288753910.png" /&gt;&lt;/span&gt;Also, if I update to d3v7, should I not be expecting package.json to reflect that version number?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 01:06:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771869#M5196</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-09-16T01:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to ensure latest version of d3</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771893#M5197</link>
      <description>&lt;P&gt;Even though D3 is present in the &lt;FONT face="courier new,courier"&gt;package.json&lt;/FONT&gt;, the default template doesn't actually use D3 for anything (it just has some simple vanilla JS DOM work for the simple message and update count that is in there to confirm that everything's working. None of the custom visual-specific assets or the webpack configuration have any dependencies on D3 either. If you didn't need it, you could remove it completely and things would still work.&lt;/P&gt;
&lt;P&gt;powerbi-visuals-tools has templates for the &lt;FONT face="courier new,courier"&gt;pbiviz &lt;/FONT&gt;command, and the &lt;A href="https://github.com/microsoft/PowerBI-visuals-tools/blob/main/templates/visuals/default/package.json" target="_self"&gt;default package.json&lt;/A&gt; includes d3 v5. Presumably, MS just haven't kept this up to date.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 01:08:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-ensure-latest-version-of-d3/m-p/2771893#M5197</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2022-09-16T01:08:04Z</dc:date>
    </item>
  </channel>
</rss>

