In Power BI Embedded on Google Chrome, the table's scroll bars are mysteriously missing

When viewing the embedded report, I noticed that scroll bars for the Table visual are not visible in Google Chrome but are visible in Firefox.

To illustrate:

Report in Power BI Workspace

https://i.sstatic.net/VBmJT.png

Report in Power BI Embedded

https://i.sstatic.net/YBLbU.png

Surprisingly, applying a specific configuration to the report seems to solve this issue, although the reason behind it remains unclear:

settings: {
    layoutType: models.LayoutType.Custom,
    customLayout: {
        pagesLayout: {
              '': { visualsLayout: { '': { } } }
        }
    }
}

I am curious about why this discrepancy occurs and the reasoning behind my workaround. Thank you!

Details of the system:

  • Angular version - 11
  • powerbi-client-angular version - 2.0.0
  • Google Chrome version: 111.0.5563.111 (Official Build) (64-bit)

Edit: Including the full settings and custom CSS applied to the report:

settings = {
    type: 'report',
    tokenType: models.TokenType.Embed,
    embedUrl: embedParameters.embedItem.embedUrl,
    accessToken: embedParameters.embedToken.token,
    settings: {
        layoutType: models.LayoutType.Custom,
        panes: {
            pageNavigation: {
                visible: false
            },
            filters: {
                visible: false
            }
        },
        customLayout: {
            pagesLayout: {
                '': {
                    visualsLayout: {
                        '': { }
                    }
                }
            }
        }
    }
} as IReportEmbedConfiguration;
<powerbi-report         
    [embedConfig]="getReportConfiguration()"
    [eventHandlers]="reportEventHandlers"
    cssClassName="report-container">
</powerbi-report>
::ng-deep .report-container {
    padding-top: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;
    height: 820px;
    width: 1280px;
}

Answer №1

At long last, I have discovered a solution to this problem.

In short: avoid using d-none (display: none) to conceal a Power BI Embedded report.

In my scenario, I had two embedded reports on the same page: Report 1 and Report 2, with only one visible at a time. The Angular code handling this situation was structured like so:

<div [class.d-none]="!isReport1Displayed">
    <ng-container *ngIf="report1EmbedParameters$ | async as report1EmbedParameters">
        <powerbi-report
            #report1
            [embedConfig]="getReportConfiguration(report1EmbedParameters)"
            [eventHandlers]="report1EventHandlers"
            cssClassName="report1-container">
        </powerbi-report>
    </ng-container>
</div>

<div [class.d-none]="isReport1Displayed">
    <ng-container *ngIf="report2EmbedParameters$ | async as report2EmbedParameters">
        <powerbi-report
            #report2
            [embedConfig]="getReportConfiguration(report2EmbedParameters)"
            [eventHandlers]="report2EventHandlers"
            cssClassName="report2-container">
        </powerbi-report>
    </ng-container>
</div>

The issue arose when both reports loaded simultaneously, even though only one was visible. Toggling the isReport1Displayed switch via button click triggered the application of d-none (e.g. display: none) to the inactive report.

This method caused some unexpected rendering problems in the visuals of the report, such as scroll bars failing to appear altogether.

To address this issue, I implemented the following CSS approach to hide the reports rather than using display: none:

.report-hidden {
    position: absolute;
    visibility: hidden;
    height: 0px;
    width: 0px;
    left: -9999px;
    top: -9999px;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Angular 9: Subscribing triggering refreshing of the page

I've been working on an Angular 9 app that interacts with the Google Books API through requests. The issue I'm facing is that whenever the requestBookByISBN(isbn: string) function makes a .subscribe call, it triggers a page refresh which I' ...

The Validation Library known as 'Yup' encounters compilation issues with TypeScript

After deciding to utilize the Yup library for form validation in my project, I encountered a persistent and confusing library error each time I tried to install it. This issue has been plaguing me despite numerous attempts to troubleshoot. Any suggestions ...

Utilizing Nginx with Angular2 for a seamless PathLocationStrategy implementation in html5

Angular2 is a single-page site, so all URL requests need to be redirected to index.html using Nginx. Below is the Nginx server block configuration: server { listen 8901; server_name my_server_ip; root /projects/my_site/dist; location /.+& ...

The issue of HTTP parameters not being appended to the GET request was discovered

app.module.ts getHttpParams = () => { const httpParamsInstance = new HttpParams(); console.log(this.userForm.controls) Object.keys(this.userForm.controls).forEach(key => { console.log(this.userForm.get(key).value) const v ...

Navigating the use of property annotations in Mapped Types with remapped keys

After exploring the concept of Key Remapping in TypeScript, as shown in this guide, I am wondering if there is a way to automatically inherit property annotations from the original Type? type Prefix<Type, str extends string> = { [Property in keyo ...

An issue occurred while compiling the 'ToastContainer' template. Decorators do not support function calls, and the call to 'trigger' caused an error

When I run ng serve and ng build, there are no errors. However, when I run ng build --prod, I encounter this error. Can anyone help me fix it? ERROR in Error during template compile of 'ToastContainer' Function calls are not supported in decor ...

Guide to Dynamically Including an Element in an Array using Typescript

Encountering a type error within the <RenderFormFields formFields={formFieldsData} /> component:- Types of property 'type' are not compatible. Type 'string' cannot be assigned to type '"select"'.ts(2322) Rende ...

How can you retrieve the preceding sibling using an Angular directive?

Currently, I am utilizing ELEMENTREF to interact with the DOM via Renderer2. Allow me to provide a simple example: import { Directive, Renderer2, ElementRef } from '@angular/core'; @Directive({ selector: '[appHighlight]' }) export c ...

Leveraging the onInit method of the main component in Angular 2 to make service calls

I am curious about the functioning of onInit, especially when it comes to calling services. Below is my main component: @Component({ selector: "app", templateUrl: "app/app.html", directives: [ROUTER_DIRECTIVES] }) @RouteConfig(){ ... } export ...

Which event is triggered following the update of all values in reactive forms?

How can I properly emit an event in Angular (v.5 or v.6) after a specific input of a reactive form has been changed? Here are the approaches I have tried: (ngModelChange)="doSomething($event)" (HTML, basic event) (bsValueChange)="doSomething($event) ...

Unable to determine the appropriate signature for calling the date function

<td> {{ fundInfo.startDate | date: "yyyy-MM-dd" }} </td> The issue is located in the primeng-test-b.component.html file under src\app\primeng-test-b directory. ...

Ways to resolve discrepancies between Bootstrap-3 and Bootstrap-4 versions

I am currently learning Angular through an older tutorial that uses Bootstrap 3.3.7. However, I have downloaded the latest version of Bootstrap, 4.4.1, which is causing some issues as I cannot follow along with the instructor and utilize certain features l ...

nodemon and ts-node not working as expected, failing to automatically recompile

I have been working on creating a REST API using express+ts-node. Following various online tutorials, I managed to set everything up and when I run the app using npm run dev, it works perfectly fine. However, I am facing an issue where it is not automatica ...

Converting a specific string format to a Date object in TypeScript

I am in need of a solution to convert strings with the given format into Date objects using TypeScript: var dateTimeString:string = "20231002-123343" I have created my own method as shown below: var dateTime:string[] = dateTimeString.split(" ...

Downloading a PDF in a Next.js application

How can I add a button or link that will instantly download my PDF portfolio when clicked? I am currently working on my resume section and would like to provide users with the option to easily download my CV. Is there a way to do this, and if so, how can ...

Running tests on functions that are asynchronous is ineffective

Recently, I made the switch from Java to TypeScript and encountered a challenging problem that has been occupying my time for hours. Here is the schema that I am working with: const userSchema = new Schema({ username : { type: String, required: true }, pa ...

Ways to transfer the entered number to the input field located outside the angular modal

I'm currently working on creating a modal that includes a button and an input field for manually entering a number. Once the number is submitted, it should appear in the input field outside the modal and be available for various functions such as sett ...

Angular's observable function is not providing a complete response

In my Angular component, I have a function that is called from a template. This function returns an Observable of type string, but unfortunately it only returns the `data` variable. How can I modify it to return `dateNew[0] + " de " + data + " de "+ dateNe ...

Steps for setting up single sign on in an Angular 2 application

Currently, I am working on a web application that has been developed using angular2. One of the requirements for this application is to incorporate a single sign-on feature, where users do not have to manually input their login credentials. Instead, the ap ...

Guide on compiling SCSS to CSS when running npm start

When running my application with npm start, I'm unable to compile scss files to css live. Is there a way to achieve live reload for sass to css similar to how ts are compiled to js by the tsc:w utility? Currently, I have to stop the build, then run gu ...