作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我不清楚 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,
pageName
和
visualName
分别指的是其所在的页面和视觉名称。
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/
我是一名优秀的程序员,十分优秀!