Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have created a Power BI report which has set display option to "Fit to page" as I do not want margins around my visuals which always appear when using "Fit to width".
I have embeded the report to my web application useing powerbi-client javascript library and it looks good on desktop.
But when I set layoutType as MobilePortrait or MobileLandscape, it always use "Fit to width" and put margins to my visuals. In the screenshot you can see width of the report content(391px) is 23px less than the window width(414px) but the iframe has taken the full width(the scrollbar on the right is generated in power bi iframe).
I have no controls to display options when the report is in mobile view as I cannot set layoutType to be Custom so it ignores my customLayout settings.
Please advice.
My embed settings:
{
navContentPaneEnabled: false,
filterPaneEnabled: false,
background: pbi.models.BackgroundType.Transparent,
layoutType:pbi.models.LayoutType.MobilePortrait,
customLayout: {
// this does not take effect when layout type is mobile
displayOption: pbi.models.DisplayOption.FitToPage,
},
}
HI @Jovie,
I think these layouts are rendered by power bi itself, power bi does not include property to custom the layout of embedded iframes. Perhaps you can submit ideas for improving these:
Regards,
Xiaoxin Sheng
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |