gpt4 book ai didi

powerbi-embedded - Power bi 嵌入中的报表视觉效果和磁贴有什么区别?

转载 作者:行者123 更新时间:2023-12-02 03:38:35 24 4
gpt4 key购买 nike

我不清楚 power bi 报告视觉效果和图 block 之间有什么区别?报告视觉效果具有更多交互界面,而磁贴则没有。

这只是一个只读报告视觉效果吗?

此外,对于报表视觉效果,您是否也无法添加渲染报表时可用的上下文菜单?

谢谢,德里克

最佳答案

区别在于 Power BI 项目的来源以及检索它所需的设置。

报表视觉对象 - 顾名思义,这是驻留在 Power BI 报表内的视觉对象。要嵌入它,您需要使用:

 
// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
type: 'visual',
tokenType: models.TokenType.Embed,
accessToken: txtAccessToken,
embedUrl: embedUrl,
id: reportId,
pageName: pageName,
visualName: visualName
};

// Get a reference to the embedded report HTML element
var embedContainer = $('#visualContainer')[0];

// Embed the report and display it within the div container.
var report = powerbi.embed(embedContainer, config);
其中 id 指的是 ReportId, pageNamevisualName 分别指的是其所在的页面和视觉名称。

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Single-Visual

磁贴 - 这是仪表板磁贴,本质上是 Power BI 中固定到仪表板的视觉对象。

// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config= {
type: 'tile',
tokenType: models.TokenType.Embed,
accessToken: accessToken,
embedUrl: embedUrl,
id: embedTileId,
dashboardId: embedDashboardId
};

// Get a reference to the embedded tile HTML element
var tileContainer = $('#tileContainer')[0];

// Embed the tile and display it within the div container.
var tile = powerbi.embed(tileContainer, config);

其中 id 是磁贴 ID (GUID),dashboardId 是其所在的仪表板。

编辑

另一个区别是报表视觉支持报表嵌入中可用的所有功能,例如书签、导出数据、自定义布局、菜单扩展......而tile仅支持仪表板交互,目前仅限于各种事件,主要是“tileClicked”事件

关于powerbi-embedded - Power bi 嵌入中的报表视觉效果和磁贴有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49357596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com