Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

D3.js Supported versions?

Hi,

 

I am currently working with writing custom visuals in Power BI using the D3.js library. https://d3js.org/ 
Initially I had issues getting the D3 files packaged into the PowerBI packages via the pbiviz command line interface.

 

It looks as though custom visualisations only work with earlier versions of the D3 library (Version 3) Using V4 doesn't appear to work at all. 

 

I used the Microsoft SVG-Utils npm package to get going with a solution that works ( https://github.com/Microsoft/powerbi-visuals-utils-svgutils ) and this contains version 3.5.5

 

Is this the latest supported version?
Is there any information on when newer versions will be supported (if they aren't already)?

Thanks in advance,

Matt

1 ACCEPTED SOLUTION

Hi Simon,

 

If you build a visual under powerbi-visuals-tools higher than 2.5, you can use any npm library for your visual.

The most of MS visuals currently use D3 v5.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi Matt,

 

D3 v 5.12 works fine for me. I created 'Power BI- Custom Visuals' course on Udemy using this version.

 

Regards,

Marek

SimonHalfspace
Regular Visitor

Hi
Is there anywhere you are able to see the latest supported version of D3.js?


Thanks in advance
Simon

Hi Simon,

 

If you build a visual under powerbi-visuals-tools higher than 2.5, you can use any npm library for your visual.

The most of MS visuals currently use D3 v5.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

nikitagrachev
Microsoft Employee
Microsoft Employee

Hello @Anonymous,


Yes, svg-utils don't support v4 yet, but it's in backlog.
D3 v3 was one large library. You had to include all of it, even if you didn't need all of it.
D3 v4 is actually a set of small modules. You can choose to use one or more as you need them.
For example, if you need 'selection' from D3 v4, you can add the following packages to your project:
https://www.npmjs.com/package/d3-selection
https://www.npmjs.com/package/@types/d3-selection

Nikita Grachev,
Team Leader
Microsoft Power BI Custom Visuals,
pbicvsupport@microsoft.com
Anonymous
Not applicable

Hi @nikitagrachev

Thanks for the reply.

Have you successfully got Version 4 running in a custom visual? 
This blog post suggests that it doesn't currently work (but it is a few months old). http://blog.jongallant.com/2016/11/pbiviz-12-d3-35-reference/ 
I am unable to find any guidance that is more recent.

Think I will try it out again.

Cheers,

 

Matt

v-viig
Community Champion
Community Champion

D3 v4 actually works. However, you can't use ES2015 module system (import/export).

I suppose that you should use window.window.d3 to access d3 v4.

 

Another option is to use prebundler such as webpack or rollup in order to generate a single JS file and use this file in pbiviz tools.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Thanks for the reply @v-viig I will give this a try asap.
Cheers.

Matt

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors