When i render the power bi visuals, I notice that there is a grey border on the right and left side of the image. Is there a way to get rid of that?
令人尴尬的是,灰色边框没有影响 iframe 的顶部或底部。
谢谢,
德里克
尝试这样的事情。 (摘自 powerbi-javascript 示例)。将 #reportContainer div 作为输入传递给 powerbi.embed,您不应该看到插入边框
<style>
#reportContainer {
width: 100%;
height: 750px;
background-color: white;
padding: 0px;
clear: both;
}
.desktop-view iframe, .mobile-view iframe {
border: none;
}
</style>
<h2>Sample PowerBI Embedded Report</h2>
<div class="desktop-view" style="display: block;">
<div id="reportContainer"></div>
</div>
For Reports,您可以执行以下操作使背景透明(以及 FitToWidth)。
var embedConfig = {
type: type,
id: id,
embedUrl: embedUrl,
viewMode: getViewModeFromModel(viewMode),
tokenType: models.TokenType.Aad,
accessToken: token,
pageView: 'fitToWidth', // applies to Dashboard only; for Report, see below
pageName: pageName,
// See https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_powerbi_models_dist_models_d_.isettings.html
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true,
background: models.BackgroundType.Transparent,
// START Report specific settings
layoutType: models.LayoutType.Custom,
customLayout: {
displayOption: models.DisplayOption.FitToWidth
}
// END Report specific settings
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)