import * as pbi from 'powerbi-client';
import * as models from 'powerbi-models';
const embedConfiguration = {
type: 'dashboard',
id: // removed
embedUrl: 'https://app.powerbi.com/dashboardEmbed',
tokenType: pbi.models.TokenType.Embed,
settings: {
background: models.BackgroundType.Transparent
},
accessToken: // removed
};
const container = document.getElementById('report-container');
window.powerbi.embed(container, embedConfiguration);
我已将容器的背景设置为粉红色,并且会短暂显示,但是在iframe中加载的报告会立即带有边框,并且报告者的背景为难看的灰色。