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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tobyfan1980
Regular Visitor

How to set the size of embed report in powerbi-angular

Hi,

 

I am following the guide in https://github.com/Microsoft/PowerBI-Angular, to embed my PowerBI report in my Angularjs web app. 

 

In the html template, I have

<powerbi-report embed-url="report.embedUrl" access-token="report.token" class="powerbi-frame--dotted"></powerbi-report>

In the controller, I get the embedUrl and token from my own backend server.

var app = angular.module('powerBIEmbedTest');
app.controller('PowerBICtrl', [
    '$scope', '$sce', '$window', 'PowerBIService', function ($scope, $sce, $window, PowerBIService) {
        $scope.status = "OK";


        PowerBIService.GetToken().then(function onSuccess(response){

            $scope.report = response.data;
        }
        ......
        ......

I can see the report is successfully loaded, but the size if very small, the height is just 150 px, the width is about 80% of the screen width. I guess this is the default size. But I don't know how to customize the size, and I did not find in the sample code on github. 

 

Please advise.

 

Thanks.

 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@tobyfan1980

Based on my test, you can define the embedded report size by changing the css file.

 

For example,for this live demo, change height and width in the app.css.

 

 

View solution in original post

3 REPLIES 3
Eric_Zhang
Microsoft Employee
Microsoft Employee

@tobyfan1980

Based on my test, you can define the embedded report size by changing the css file.

 

For example,for this live demo, change height and width in the app.css.

 

 

File is not opening ..

 

Thanks for the advise. I saw the css file. So, it means I can define my own types in css (e.g., powerbi-frame-xl) specifying its style and use it as 'class' in my <powerbi-report>.  Correct?

 

I have tried in my project, it works. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors