Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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?
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |