Ich möchte mein PowerBi-Dashboard in eine HTML-Datei mit JavaScript aus dem Beispielcode von this GitHub einbetten. Der Fehler, ich bin immer ist:PowerBi JavaScript-Dashboard embedConfiguration
konnte nicht erhalten Eigenschaft ‚Modelle‘ von undefined oder null Referenz
Bin ich eine .js
-Datei fehlt, die dem Kopfteil hinzugefügt werden muss?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.js"></script>`
<script>
$(document).ready(function() {
// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;
var embedConfiguration = {
type: 'dashboard',
id: 'dashboardid',
embedUrl: 'https://app.powerbi.com/reportEmbed',
tokenType: models.TokenType.Aad,
accessToken: 'TokenKey'
};
var $dashboardContainer = $('#embedContainer');
var dashboard = powerbi.embed($dashboardContainer.get(0), embedConfiguration);
});
</script>
</head >
<body>
<div id="dashboardContainer"></div>
</body >
</html >
Haben Sie versucht PowerBi js Bibliothek enthalten? Danach denke ich, dass du vielleicht d3 brauchst. auch – Alberto