Forum Discussion

NerdFlanders's avatar
NerdFlanders
Advocate I
9 years ago
Solved

Javascript toggle navigation bar

Hey,

 

I'm trying to embed a PowerBI report using the javascript api. The embedding itself already works fine, but how do i interact with the report now, for example toggle the visiblity of the navigation pane. 

This is the javascriptcode for the embedding:

 

var models = window['powerbi-client'].models;

var $staticReportContainer = $('#iFrameReport');
var staticReport;

 

var embedConfig = {

    type: 'report',
    embedUrl: 'https://app.powerbi.com/reportEmbed/',
    accessToken: document.getElementById('MainContent_accessToken').value,
    id: '2ce50ab9-.......-e871bbihb78b3',
}

staticReport = powerbi.embed($staticReportContainer.get(0), embedConfig);

 

So do I have to write now to turn the navigation pane on and off?

The sample on Github does not help.

 

Thank you!

4 Replies

Replies have been turned off for this discussion