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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jovie
New Member

Power BI client cannot set display option but force to Fit to width in mobile view

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.

Screenshot 2022-02-18 193059.jpg

 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,
        },
}

 

 

1 REPLY 1
Anonymous
Not applicable

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:

Microsoft Power BI ideas

Regards,
Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.