Dashboard class
A Power BI Dashboard embed component
- Extends
-
Embed
Methods
get |
Get dashboard id from first available location: options, attribute, embed url. |
Inherited Methods
exit |
Requests the browser to exit fullscreen mode. |
fullscreen() | Requests the browser to render the component's iframe in fullscreen mode. |
get |
Get the correlationId for the current embed session.
|
off<T>(string, IEvent |
Removes one or more event handlers from the list of handlers. If a reference to the existing handle function is specified, remove the specific handler. If the handler is not specified, remove all handlers for the event name specified.
|
on<T>(string, IEvent |
Adds an event handler for a specific event.
|
reload() | Reloads embed using existing configuration. E.g. For reports this effectively clears all filters and makes the first page active which simulates resetting a report back to loaded state.
|
remove |
Removes element's tabindex attribute |
save() | Saves Report. |
save |
SaveAs Report. |
set |
Set accessToken. |
set |
Sets element's tabindex attribute |
set |
Set the component title for accessibility. In case of iframes, this method will change the iframe title. |
Method Details
getId()
Get dashboard id from first available location: options, attribute, embed url.
function getId(): string
Returns
string
Inherited Method Details
exitFullscreen()
Requests the browser to exit fullscreen mode.
function exitFullscreen()
Inherited From Embed.exitFullscreen
fullscreen()
Requests the browser to render the component's iframe in fullscreen mode.
function fullscreen()
Inherited From Embed.fullscreen
getCorrelationId()
Get the correlationId for the current embed session.
// Get the correlationId for the current embed session
report.getCorrelationId()
.then(correlationId => {
...
});
function getCorrelationId(): Promise<string>
Returns
Promise<string>
Inherited From Embed.getCorrelationId
off<T>(string, IEventHandler<T>)
Removes one or more event handlers from the list of handlers. If a reference to the existing handle function is specified, remove the specific handler. If the handler is not specified, remove all handlers for the event name specified.
report.off('pageChanged')
or
const logHandler = function (event) {
console.log(event);
};
report.off('pageChanged', logHandler);
function off<T>(eventName: string, handler?: IEventHandler<T>)
Parameters
- eventName
-
string
- handler
-
IEventHandler<T>
Inherited From Embed.off
on<T>(string, IEventHandler<T>)
Adds an event handler for a specific event.
report.on('pageChanged', (event) => {
console.log('PageChanged: ', event.page.name);
});
function on<T>(eventName: string, handler: IEventHandler<T>)
Parameters
- eventName
-
string
- handler
-
IEventHandler<T>
Inherited From Embed.on
reload()
Reloads embed using existing configuration. E.g. For reports this effectively clears all filters and makes the first page active which simulates resetting a report back to loaded state.
report.reload();
function reload(): Promise<void>
Returns
Promise<void>
Inherited From Embed.reload
removeComponentTabIndex(number)
Removes element's tabindex attribute
function removeComponentTabIndex(_tabIndex?: number)
Parameters
- _tabIndex
-
number
Inherited From Embed.removeComponentTabIndex
save()
Saves Report.
function save(): Promise<void>
Returns
Promise<void>
Inherited From Embed.save
saveAs(ISaveAsParameters)
SaveAs Report.
function saveAs(saveAsParameters: ISaveAsParameters): Promise<void>
Parameters
- saveAsParameters
- ISaveAsParameters
Returns
Promise<void>
Inherited From Embed.saveAs
setAccessToken(string)
Set accessToken.
function setAccessToken(accessToken: string): Promise<void>
Parameters
- accessToken
-
string
Returns
Promise<void>
Inherited From Embed.setAccessToken
setComponentTabIndex(number)
Sets element's tabindex attribute
function setComponentTabIndex(tabIndex?: number)
Parameters
- tabIndex
-
number
Inherited From Embed.setComponentTabIndex
setComponentTitle(string)
Set the component title for accessibility. In case of iframes, this method will change the iframe title.
function setComponentTitle(title: string)
Parameters
- title
-
string
Inherited From Embed.setComponentTitle