- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我嵌入了 PowerBI 报告。这是带有页面设置的 Javascript。
出于某种原因,我的报告中没有垂直滚动条。当我在工作区在线打开它时,滚动条工作得很好。我已经尝试在 PowerBi 中的不同“查看”选项之间切换,但这似乎没有什么不同。
<H2>PowerBI</H2>
<p><i>User: {{username}} | AccessLevel: {{access_level}}</i></p>
<div id="reportContainer" style="height: 80vh;"></div>
<script type="text/javascript">
window.onload = function () {
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
var embedConfiguration = {
type: 'report',
id: '{{txtembedreportid}}',
embedUrl: '{{txtreportembed}}',
tokenType: models.TokenType.Embed,
accessToken: '{{txtaccesstoken}}',
settings: {
layoutType: models.LayoutType.Custom,
customLayout: {
pageSize: {
type: models.PageSizeType.Widescreen,
}
},
panes:{
bookmarks: {
visible: false
},
fields: {
expanded: false
},
filters: {
expanded: false,
visible: false
},
pageNavigation: {
visible: true
},
selection: {
visible: true
},
syncSlicers: {
visible: true
},
visualizations: {
expanded: false
}
}
}
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
report.fullscreen();
}
</script>
最佳答案
尝试在 customLayout 对象中添加值为“FitToWidth”的“displayOption”属性,因为此选项将尝试根据页面的总可用大小来调整报告,并在必要时为剩余部分引入滚动条。
同时将 pageSizeType 对象中的“宽屏”更改为“自定义”
所有更改后,您的 embedConfiguration 将如下所示。
var embedConfiguration = {
type: 'report',
id: '{{txtembedreportid}}',
embedUrl: '{{txtreportembed}}',
tokenType: models.TokenType.Embed,
accessToken: '{{txtaccesstoken}}',
settings: {
layoutType: models.LayoutType.Custom,
customLayout: {
displayOption: models.DisplayOption.FitToWidth, // Add "FitToWidth"
pageSize: {
type: models.PageSizeType.Custom, // Change to "Custom"
}
},
panes:{
bookmarks: {
visible: false
},
fields: {
expanded: false
},
filters: {
expanded: false,
visible: false
},
pageNavigation: {
visible: true
},
selection: {
visible: true
},
syncSlicers: {
visible: true
},
visualizations: {
expanded: false
}
}
}
};
引用文档:https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/custom-layout
关于javascript - PowerBI Embedded 垂直滚动条不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66527385/
有人知道对 PowerBI 仪表板中的文本进行拼写检查的任何变通方法吗?该功能似乎不存在。我知道的唯一方法是先将文本复制到 Word 或 PPT 中,确保语法和拼写正确,然后将其粘贴到 PowerBI
我想与没有 Microsoft/PowerBI 帐户的用户共享一些 PowerBi 仪表板。我知道我可以在 Sharepoint 在线共享它,但此解决方案的问题是我们可以在网页按钮上找到的共享按钮(F
我发现从头开始开发 PowerBI 视觉效果很难。我正在阅读 wiki , guide , 检验examples ,但仍然觉得在理解它的内部工作方式方面存在巨大差距——它没有“点击”。 (我了解 D3
如果我在表中有一列,其中每个单元格都包含文本,我如何将它们作为输出推送到例如一张卡片并用新行分隔单元格? 我一直在使用 CONCATENATEX 函数,它接受一个分隔符参数;然而,标准换行符 ('\n
我在 PowerBI 中有两个显示国家/地区数据的表,一个表包含不同国家/地区的销售数据,另一个显示每个国家/地区的统计数据。然后我有一个仪表板,其中包含每个表的图表。我想要一个过滤器来过滤两个表中的
我有一些图表想要按降序排序。我读过,如果您单击图表,会出现一个“更多选项”选项,这将使您能够进行排序。 在下面的图表中,没有排序选项: 这是图表所基于的字段(它是单个字段): 这是我设置图表的方式:
我在 Power BI 中有一个 VS Team Services 项目的燃尽图 - 以便我们可以报告故事点,而不是剩余的工作量。 在图表中,X 轴上有日期。有没有办法从图表中过滤掉周末日期?周末没有
我在生产部门工作,我们测量不同机器的使用时间。基本上,当大多数人开始使用机器和大多数人使用完机器时,我想在 PowerBI 中向我的同事展示一个条形图(以整点显示,例如 7、10、16)。 我有 2
我在 PowerBI 中有一个类似于以下内容的表: Table1 Name Group GroupScore Jim 1 75 Al 1
Display rows where foreign key is present in PowerBI 的跟进 我现在有以下查询通过连接检索数据并显示为表格: let Source = Sq
我正在尝试为 PowerBI 报告进行数据集刷新。我创建了网关,并且能够从管理门户刷新数据集。我可以验证刷新是否从 UI 成功发生,即管理门户中的上次刷新列。但是当我尝试从 C# webapi 代码进
是否可以显示从流分析到达 PowerBi 的最新值?例如,在卡片图类型中,我想象有一个测量时间字段的过滤器值选择最新值或其他值? 最佳答案 您现在能做的最好的事情就是使用问答来提出“在过去 10 秒内
我有两个主要数据集: 包含所有销售交易的真实数据。 例如RealData: Date;Sales 16-01-2017;1200 20-01-2017;1500 05-02-2017;800 08-0
我一直在尝试生成嵌入访问 token ,以便我可以将我在 Power BI 上所做的报告嵌入到 React.JS Web 应用程序中。我按照以下步骤操作 https://community.power
我正在尝试通过调用以下端点来为报告生成嵌入 token ,但这让我遇到了 CORS 问题。 Failed to load https://api.powerbi.com/myorg/groups//r
我有一个由用户控制的日期切片器。我正在尝试使用用户的最小/最大日期选择作为指标。我创建了两个度量 - 一个用于最小值,另一个用于最大值。请参阅下面的 DAX 代码: NewMin = CALCULAT
我在 Heroku 上有一个 PowerBI 实例和一个 Postgres 数据库。在我的搜索中,PowerBI 的 PostgreSQL 连接器似乎都适用于桌面: https://powerbi.m
是否有一种简单的解决方案可以在发布报表后自动刷新使用 Power BI 中的 Cosmos DB 生成的报表中的数据? 现在我可以使用 Power BI Desktop 从 Power BI 导入数据
我正在尝试根据 PowerBI/DAX 中的汽车数量找到每天的最大路线。我的数据示例如下: Date Route Count 01-Nov-17 A
是否有一种简单的解决方案可以在发布报表后自动刷新使用 Power BI 中的 Cosmos DB 生成的报表中的数据? 现在我可以使用 Power BI Desktop 从 Power BI 导入数据
我是一名优秀的程序员,十分优秀!