Forum Discussion
tylersbrown01
8 years agoFrequent Visitor
Setting up D3 V4 with Custom Visuals and Types
D3 V4 has been out for some time now, but there is not a straightforward way to get it working inside a pbiviz. Instead, most Power BI examples and documentation show you how to work with D3 version ...
- 8 years ago
There's no need to use module bundler.
The solution is:
- Remove let d3 = (<any>window).d3; from TypeScript code.
- Instead you should create a new file "d3Injector.js" (you can call it as you want).
- Put var d3 = window.d3; into created file
- Include d3Injector.js into externlaJS property of pbiviz.json right after "node_modules/d3/build/d3.min.js"
Please let me know if that works for you as well.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
mrogunlana
7 years agoFrequent Visitor
Has the typescript version been updated yet? Or, what is the current version of typescript that the pbi library uses?
v-viig
Community Champion
7 years agoWe recently released the beta version of PBIVIZ Tools that uses the new TypeScript and webpack under the hood.
That means you can use D3 v4 and even v5 :smileyhappy:
To find out more please visit this blog post.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals