-2

I have integrated powerbi-embedded with Angular 9 web app also add code for custom layut but it's not working. I want to customize operations menu /context and custom layout. Configuration object -

const config: any = {
 type: 'report',
 uniqueId: 'report-id',
 permissions: this.model.Permissions.All,
 embedUrl: 'embed-url',
 accessToken: 'access-token',
 settings: {
    layoutType: this.models.LayoutType.Custom,
    customLayout: {
        pageSize: {
            type: this.models.PageSizeType.Custom,
            width: 1600,
            height: 1200
        },
        displayOption: this.models.DisplayOption.ActualSize,
        pagesLayout: {
            "MyReportSection007" : {
                defaultLayout: {
                    displayState: {
                        mode: this.models.VisualContainerDisplayMode.Hidden
                    }
                },
                visualsLayout: {
                    "VisualContainer1": {
                        x: 1,
                        y: 1,
                        z: 1,
                        width: 400,
                        height: 300,
                        displayState: {
                            mode: this.models.VisualContainerDisplayMode.Visible
                        }
                    },
                    "VisualContainer2": {
                        displayState: {
                            mode: this.models.VisualContainerDisplayMode.Visible
                        }
                    },
                }
            }
        }
    }
 }
}; 

Above config. not working. any idea how can i achived customization in menu operation and layout.

I'm following below docs -

https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#
https://github.com/microsoft/PowerBI-JavaScript/wiki/Custom-Layout

Thanks,

Vaibhav Gaikwad
  • 811
  • 2
  • 12
  • 21

1 Answers1

2

Your query is not clear since you have not shared any error message. Though, code snippet that you shared offers a correct solution but, it might be possible that you are using wrong names for visual containers (i.e. VisualContainer1 or VisualContainer2) or the report page name (i.e. MyReportSection007). Ensure that you are providing correct names.

And if possible, please share the error message as well.

mayur_007X
  • 764
  • 4
  • 14
  • Thanks for answering @mayur_007x. The actual problem with above problem is token invalid. I just updated valid token and working fine. – Vaibhav Gaikwad Oct 21 '20 at 05:25