This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all!
I'm newbie in custom visuals development so sorry for a stupid question may be.
I follow this instruction for creating a new custom visual.
I created the new project using the same way as instruction says. It works fine.
Well, I installed d3 library and added typings using command:
npm install @types/d3@3.5 --save-dev
My little project understands type d3 after that. But it does not work now.
I did a little research and saw the following message in browser console:
As I see the script crashes because export command appears at NOT top level of module.
I will be grateful for any help.
Thanks in advance,
Alexander.
Solved! Go to Solution.
What version of d3 did you install?
Power BI Visuals Tools support d3v3 only.
We'd recommend to install d3v3:
npm i d3@3.5.5 @types/d3@3.5.36
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
What version of d3 did you install?
Power BI Visuals Tools support d3v3 only.
We'd recommend to install d3v3:
npm i d3@3.5.5 @types/d3@3.5.36
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Hello Ignat!
Thank you so much! It works.
I think it will be good to update this section of tutorial on Github.
It contains an example of d3 version 4.9.1 installation.
Thank you once again!
Regards,
Alexander.
Hi Alexander,
Thank you for the feedback.
We're working on improving our documentation.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.