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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
adamdavi3s
Frequent Visitor

typings and versions of D3

Dear All,


Brand new to developing for PBI and pretty new to JS / D3 but have a few extensions written and running for qlikview, but this is probably a basic question.

 

I wanted to try and convert one of these to work with PBI but I get errors and I suspect as using the typings thing with PBI means I have the latest version (4) or D3?

I know the extension works on v3, so can I somehow use this instead? I tried packaging up the d3v3.js and loading that but obviously it didn't work.

 

I assume typings is used so that you don't have to package the additional js files and everyone is working on the same version?

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@adamdavi3s,

 

Based on my research, you may download the external library of your choice and add the library to your tsconfig.json file.

https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Sam,


Thank you, I am currently beating my head on the desk trying to figure this stuff out!

I thought developing for Qlikview was bad but this seems way OTT and undocumented.

 

I had tried adding it, but then just got a bunch of D3 namespace doesn't exist kind of errors. I've figured out (I think) that some of the typings D3 stuff is just a bit different so for example D3.event.foo becomes (d3.event as event).foo etc

 

I did also find this blog which seems useful as he's managed to store the D3 extension (Rather than library) as separate code and then loads it, however I suspect it might give the same issues.. not had chance to test it yet!

http://blog.jongallant.com/2016/09/powerbi-custom-visual-from-existing-d3.html

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors