Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript PowerBI嵌入式-如何自定义菜单操作/上下文和自定义布局_Javascript_Angular_Powerbi_Powerbi Embedded_Powerbi Custom Visuals - Fatal编程技术网

Javascript PowerBI嵌入式-如何自定义菜单操作/上下文和自定义布局

Javascript PowerBI嵌入式-如何自定义菜单操作/上下文和自定义布局,javascript,angular,powerbi,powerbi-embedded,powerbi-custom-visuals,Javascript,Angular,Powerbi,Powerbi Embedded,Powerbi Custom Visuals,我已经将powerbi与Angular 9 web应用程序集成,还为自定义Layout添加了代码,但它不起作用。 我想自定义操作菜单/上下文和自定义布局。 配置对象- const config: any = { type: 'report', uniqueId: 'report-id', permissions: this.model.Permissions.All, embedUrl: 'embed-url', accessToken: 'access-token', settin

我已经将powerbi与Angular 9 web应用程序集成,还为自定义Layout添加了代码,但它不起作用。 我想自定义操作菜单/上下文和自定义布局。 配置对象-

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
                        }
                    },
                }
            }
        }
    }
 }
}; 
以上配置。不工作。你知道如何在菜单操作和布局方面实现定制吗

我下面是一些文件-



谢谢,

您的查询不清楚,因为您没有共享任何错误消息。 尽管如此,您共享的代码片段提供了正确的解决方案,但可能是您对可视容器(即VisualContainer1或VisualContainer2)或报表页面名称(即MyReportSection007)使用了错误的名称。确保您提供了正确的名称


如果可能,也请分享错误信息。

感谢您回答@mayur_007x。上述问题的实际问题是令牌无效。我刚刚更新了有效令牌,工作正常。