Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)
How can I get a power bi report with I am changing the ratio of the report and I am getting a grey void in the margins and how can I this grey margin when I change the ratio?

1 Answer

0 votes
by (22.5k points)

You can change it by using the following formula:

report.on("rendered", function (event) {
   report.getPages()
      .then(function (pages) {
         for (i = 0; i < pages.length; i++) {
            if(pages[i].isActive)
            {
               $("#report-container").width($("#report-container").height()*(pages[i].defaultSize.width/pages[i].defaultSize.height));
               break;
            }
         }
      });
   report.off("rendered");
});

 Want to learn more about Power Bi, Come & join: power bi tutorial  

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jan 6, 2021 in BI by Chris (11.1k points)

Browse Categories

...