Tableau Embedding API
    Preparing search index...

    Interface AuthoringViz

    The interface for the top level Authoring Viz object.

    interface AuthoringViz {
        debug?: boolean;
        height?: string | number;
        hideCloseButton?: boolean;
        hideEditInDesktopButton?: boolean;
        iframeAttributeClass?: string;
        iframeAttributeLoading?: string;
        iframeAttributeStyle?: string;
        iframeAuth?: boolean;
        onEditInDesktopButtonClicked?: string;
        onFirstInteractive?: string;
        onFirstVizSizeKnown?: string;
        onWorkbookPublished?: string;
        onWorkbookPublishedAs?: string;
        onWorkbookReadyToClose?: string;
        src?: null | string;
        suppressDefaultEditBehavior?: boolean;
        token?: string;
        touchOptimize?: boolean;
        width?: string | number;
        getCurrentSrcAsync(): Promise<string>;
        isAnalyticsAssistantAvailableAsync(): Promise<boolean>;
        launchAnalyticsAssistantAsync(): Promise<void>;
        resize(): void;
        setAuthToken(token: string): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Gets the visualization's current URL.

      Returns Promise<string>

    • Indicates whether the Analytics Assistant side pane is available.

      Returns Promise<boolean>

    • Use this method to launch the Analytics Assistant side pane. You can use the isAnalyticsAssistantAvailableAsync() method to check if the Analytics Assistant is available for use.

      const isAnalyticsAssistantAvailable = await viz.isAnalyticsAssistantAvailableAsync();
      if (isAnalyticsAssistantAvailable) {
      await viz.launchAnalyticsAssistantAsync();
      }

      Returns Promise<void>

    • Use this method to readjust the dimensions of the embedded viz in response to things like a window resize, device orientation change, or parent container resize.

      window.addEventListener('resize', () => viz.resize());

      new ResizeObserver(() => viz.resize()).observe(viz.parentElement);

      Returns void

    • Provide an auth token for salesforce native mode

      Parameters

      • token: string

      Returns void

    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.

    hideCloseButton?: boolean

    Indicates whether the Close button is hidden or visible. If not set, defaults to false, meaning that the Close button is visible.

    <tableau-authoring-viz id="tableauViz" hide-close-button />
    
    hideEditInDesktopButton?: boolean

    Indicates whether the Edit in Desktop button is hidden or visible. If not specified, defaults to false, meaning that the Edit in Desktop button is visible.

    <tableau-viz id="tableauViz" hide-edit-in-desktop-button>
    <tableau-authoring-viz id="tableauViz" hide-edit-in-desktop-button>
    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 />
    onEditInDesktopButtonClicked?: string

    An event raised when the user clicks on the Edit In Desktop Button. You can use this event type with TableauViz objects.

    <tableau-viz id="tableauViz" onEditInDesktopButtonClicked="onEditInDesktopButtonClickedHandler" />
    <tableau-authoring-viz id="tableauViz" onEditInDesktopButtonClicked="onEditInDesktopButtonClickedHandler" />
    onFirstInteractive?: string

    An event raised when the Viz object first becomes interactive. This is only raised once.

    <tableau-viz id="tableauViz" "onFirstInteractive"="onFirstInteractiveHandler" />
    <tableau-authoring-viz id="tableauViz" onFirstInteractive="onFirstInteractiveHandler" />
    onFirstVizSizeKnown?: string

    An event raised when the size of the viz is known. You can use this event to perform tasks such as resizing the elements surrounding the Viz object once the object's size has been established.

    <tableau-viz id="tableauViz" "onFirstVizSizeKnown"="onFirstVizSizeKnownHandler" />
    <tableau-authoring-viz id="tableauViz" onFirstVizSizeKnown="onFirstVizSizeKnownHandler" />
    onWorkbookPublished?: string

    An event raised when the workbook has been published. This notification is sent when using embedded web authoring functionality.

    <tableau-authoring-viz id="tableauViz" onWorkbookPublished="onWorkbookPublishedHandler" />
    
    onWorkbookPublishedAs?: string

    An event raised when "publish as" is successful. This notification is sent when using embedded web authoring functionality.

    <tableau-authoring-viz id="tableauViz" onWorkbookPublishedAs="onWorkbookPublishedAsHandler" />
    
    onWorkbookReadyToClose?: string

    An event raised when the workbook is ready to close. This notification is sent when using embedded web authoring functionality.

    <tableau-authoring-viz id="tableauViz" onWorkbookReadyToClose="onWorkbookReadyToCloseHandler" />
    
    src?: null | string

    The viz src

    suppressDefaultEditBehavior?: boolean

    Indicates whether the default edit behavior is suppressed. If not specified, defaults to false, meaning that the default edit behavior is not suppressed.

    <tableau-viz id="tableauViz" suppress-default-edit-behavior>
    <tableau-authoring-viz id="tableauViz" suppress-default-edit-behavior>
    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" />
    touchOptimize?: boolean

    Indicates whether to touch optimize viz controls.

    <tableau-viz id="tableauViz" touch-optimize />
    <tableau-authoring-viz id="tableauViz" touch-optimize />
    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.