microsoft / powerbi-client-angular

Power BI Angular component. This library lets you embed Power BI report, dashboard, dashboard tile, report visual, or Q&A in your Angular application.
Other
136 stars 65 forks source link

Styling the div/iframe #20

Closed andytate1968 closed 1 year ago

andytate1968 commented 2 years ago

<powerbi-report [embedConfig]="reportConfig" [phasedEmbedding]="phasedEmbeddingFlag" [eventHandlers]="eventHandlersMap">

How can I set the height and width of the iFrame that is produced? Also, how can I get the report to align to the left of the iFrame? Currently it shows a 150px height iFrame. I want to also be able to set the border to none. I know you can pass a css class to it but can't find what you can set using that i.e. what is the format of it?

mratanusarkar commented 2 years ago

Hello, I am having the same rendering issue!! even if I have the whole page available, and the parent div can occupy the full page, still the <div class="report-container">, <powerbi-report> and the <iframe> is taking up fixed height (around 150px)!!

I have no issues with the width, and it is easily manipulated with the below settings in reportConfig: IReportEmbedConfiguration

settings: {
    filterPaneEnabled: false,
    navContentPaneEnabled: false,
    layoutType: models.LayoutType.Custom,
    customLayout: {
        displayOption: models.DisplayOption.FitToWidth
    }
}

Please refer attached screenshot for the issue:

ng-power-bi rendering issue

LuisCarlosRajoy commented 2 years ago

Hi, I've been facing this same issue and found a "css workaround" in my case I'm using Angular 12 , in my template's main styles css file, I've addded the following line:

powerbi-report > div {
  height: (your height)px!important;
}

Quick note, I've tried in my component stylesheet file first, and didn't work.

KotanaSai21 commented 1 year ago

Refer to component and