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
Anonymous
Not applicable

setting background color of the iframe

We are embeding a pbi report in our app using the javascript api.  The issue is the background color of the iframe / div exploreCanvas is a grey [#EAEAEA].  For seamless integration in our app i'd like to remove the background color or set it to white.  Any ideas?

4 REPLIES 4
juan_pablo
Advocate III
Advocate III

Use the Wallpaper setting section in the Format Pane and set the wallpaper color to black or #000000 or the color you wish. That would be the color of the iframe.

Eric_Zhang
Microsoft Employee
Microsoft Employee


@Anonymous wrote:

We are embeding a pbi report in our app using the javascript api.  The issue is the background color of the iframe / div exploreCanvas is a grey [#EAEAEA].  For seamless integration in our app i'd like to remove the background color or set it to white.  Any ideas?


@Anonymous

I used to read some blog and did some research on changing the background of an iframe. The conclusion is that, iframe is a container, you can change the container background color but not the the background color of the html page in the container, which means no for your request, you can't change the background color of the power bi page in the iframe.

 

There seems some Javascript tricks that can manipulate the page CSS stype in the iframe only if the page is from the same domain of the main page containing iframe. However Power BI report pages are surely not from the same domain of your web application.

Anonymous
Not applicable

I was hoping this could be added the the javascript API.  I'm going to go vote for that.

This is being discussed here...

 

https://community.powerbi.com/t5/Developer/Setting-the-iframe-background-for-embedded-reports-defaul...

 

And it appears it will be available 'soon'.

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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