AskData | Tableau Embedding API

Interface AskData

The interface for the top level AskData object.

interface AskData {
    debug?: boolean;
    height?: string | number;
    iframeAttributeClass?: string;
    iframeAttributeLoading?: string;
    iframeAttributeStyle?: string;
    iframeAuth?: boolean;
    origin?: string;
    showEmbed?: boolean;
    showPin?: boolean;
    showSave?: boolean;
    showShare?: boolean;
    src?: null | string;
    token?: string;
    width?: string | number;
}

Hierarchy (View Summary)

Index

Properties

debug?: boolean

Indicates whether the non-minified version of JavaScript is loaded. If specified (or set to true), the non-minified version is used for both the local component and the Tableau Server visualization (if enabled). If not specified (or set to false), the minified version of the JavaScript files are loaded.

<tableau-viz id="tableauViz" debug />
<tableau-authoring-viz id="tableauViz" debug />
<tableau-ask-data id="tableauAskData" debug />
height?: string | number

Represents height in pixels Can be any valid CSS size specifier. If not specified, defaults to the published height of the view.

iframeAttributeClass?: string

The value of the 'class' attribute of the embedded iframe providing access to any custom selectors defined in the <iframe-style> child tag.

<tableau-viz id="tableauViz" iframe-attr-class="red-border">
<iframe-style>
.red-border {
border: 1px solid red;
}
</iframe-style>
</tableau-viz>
iframeAttributeLoading?: string

The value of the 'loading' attribute of the embedded iframe. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#loading

<tableau-viz id="tableauViz" iframe-attr-loading="lazy" />
<tableau-authoring-viz id="tableauViz" iframe-attr-loading="lazy" />
<tableau-pulse id="tableauPulse" iframe-attr-loading="lazy" />
iframeAttributeStyle?: string

The value of the 'style' attribute of the embedded iframe.

<tableau-viz id="tableauViz" iframe-attr-style="border: 1px solid red" />
<tableau-authoring-viz id="tableauViz" iframe-attr-style="border: 1px solid red" />
<tableau-pulse id="tableauPulse" iframe-attr-style="border: 1px solid red" />
iframeAuth?: boolean

Indicates whether to use the old auth mechanism for authentication which happens inside the iframe. If specified, VizLoadErrorEvents triggered due to auth failures will not be thrown.

<tableau-viz id="tableauViz" iframe-auth />
<tableau-authoring-viz id="tableauViz" iframe-auth />
<tableau-ask-data id="tableauAskData" iframe-auth />
origin?: string

Used for telemetry

<tableau-ask-data id="tableauAskData" origin="embeddingSite">
showEmbed?: boolean

Indicates whether the embed button is hidden or visible.

<tableau-ask-data id="tableauAskData" show-embed>
showPin?: boolean

Indicates whether the pin button is hidden or visible.

<tableau-ask-data id="tableauAskData" show-pin>
showSave?: boolean

Indicates whether the save button is hidden or visible.

<tableau-ask-data id="tableauAskData" show-save>
showShare?: boolean

Indicates whether the share button is hidden or visible.

<tableau-ask-data id="tableauAskData" show-share>
src?: null | string

The viz src

token?: string

The token used for authorization

<tableau-viz id="tableauViz" token="some-token-containing-clientId" />
<tableau-authoring-viz id="tableauViz" token="some-token-containing-clientId" />
<tableau-ask-data id="tableauAskData" token="some-token-containing-clientId" />
width?: string | number

Represents width in pixels Can be any valid CSS size specifier. If not specified, defaults to the published width of the view.