gpt4 book ai didi

javascript - Power BI 如何使用 powerbi javascript api 获取嵌入式报表中的视觉数据

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

当我成功地将报表嵌入到 html div 容器中时,现在我想获取报表数据(或报表页面的视觉数据),可以通过 Power BI JavaScript SDK API 获取吗?

最佳答案

要获取特定页面中的视觉效果列表,请使用 Page 对象上的 getVisuals 异步方法。

page.getVisuals().then(function(visuals) {
...
});

示例:获取首页上的视觉效果列表:

report.getPages()
.then(function (pages) {
// Retrieve first page.
var firstPage = pages[0];

firstPage.getVisuals()
.then(function (visuals) {
console.log(visuals);
})
})

https://github.com/Microsoft/PowerBI-JavaScript/wiki/Get-Visuals

但是看看对象层次结构你就无能为力了( https://github.com/Microsoft/PowerBI-JavaScript/wiki/Understanding-the-object-hierarchy ) PowerBI-JavaScript Object Hierachy

关于javascript - Power BI 如何使用 powerbi javascript api 获取嵌入式报表中的视觉数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48096881/

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