Skip to content

Embed Single Visual

Amit Shuster edited this page Jan 24, 2021 · 4 revisions
ℹ️ This wiki has been deprecated
All our Client APIs documentation and references can be found in the new Power BI embedded analytics Client APIs documentation set.
For the content of this article see Embed a report visual.

Embedding single visual uses a configurations which is very similar to report embed configurations.

interface IVisualEmbedConfiguration {
  type: string;
  id: string;
  pageName: string;
  visualName: string;
  embedUrl: string;
  accessToken: string;
  tokenType?: models.TokenType;
  permissions?: models.Permissions;
  settings?: IEmbedSettings;
  filters?: models.IFilter[];
  height?: number;
  width?: number;
}

Parameters

type: must be 'visual'.

id: Id of the report which contains the visual you want to embed.

pageName: name of the Page which contains the visual you want to embed.

visualName: name of the visual.

embedUrl: Embed url of the containing report.

width and height: Optional parameters. If not provided, div element width and height will be used.

Learn more about other parameters in Embed-Configuration-Details.

Implementation of Single visual embed

Implementation of single visual embed uses the custom layout feature. To embed a single visual, we define the default layout as Hidden for all visuals except the one we want to embed. In addition, we give the visual the full size of the HTML dev element provided.