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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
piotr_d
New Member

Embed Single Visual - error when size is not set

I'm trying to embed single visual using the documentation available on https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Single-Visual I want to display the visual in different divs of different sizes so it could adjust its size correctly. According to the page, the width and height params are optional - when left empty, the div's size should be used, which is exactly what I need. That however seems to not work in my case. When I specify width and height in the embed configuration, everyhting works correctly, but when I don't provide those values, the following exceptions are thrown in the browser console and no visual is shown on the page:

 

 

reportembed.externals.bundle.min.js:641 TypeError: Cannot read property 'fn' of undefined
    at e.requireSync (powerbiportal.dependencies.bundle.min.js:15)
    at Object.fn (powerbiportal.explore.bundle.min.js:26)
    at t.get (reportembed.common.bundle.min.js:59)
    at Object.lazyScopedSync (reportembed.common.bundle.min.js:59)
    at F.scaleVisualContainersToCanvas (powerbiportal.explore.bundle.min.js:32)
    at powerbiportal.explore.bundle.min.js:31
    at reportembed.externals.bundle.min.js:664
    at m.$digest (reportembed.externals.bundle.min.js:665)
    at reportembed.externals.bundle.min.js:668
    at e (reportembed.externals.bundle.min.js:565)

 

I'm using powerbi-client 2.6.5 installed via npm. It this a bug, or should I specify additional params to make it work without sepcifying the size?

 

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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