Tableau Embedding API
    Preparing search index...

    Interface Dashboard

    interface Dashboard {
        index: number;
        isActive: boolean;
        isHidden: boolean;
        name: string;
        objects: DashboardObject[];
        parentStoryPoint: null | StoryPoint;
        sheetType: SheetType;
        size: SheetSize;
        url: string;
        workbook: Workbook;
        worksheets: Worksheet[];
        applyFilterAsync(
            fieldName: string,
            values: string[],
            updateType: FilterUpdateType,
            filterOptions: FilterOptions,
        ): Promise<string>;
        changeSizeAsync(sheetSize: SheetSize): Promise<SheetSize>;
        getFiltersAsync(): Promise<Filter[]>;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Applies a simple categorical filter (non-date) to the dashboard. This method is similar to the method used for worksheets, but applies the filter to all the worksheets in the dashboard that have that same field. Note that the filter is ignored by a worksheet if the worksheet doesn't have the relevant field in its data source.

      Parameters

      • fieldName: string

        The name of the field to filter on.

      • values: string[]

        The list of values to filter on.

      • updateType: FilterUpdateType

        The update type of this filter (add, all, remove, replace).

      • filterOptions: FilterOptions

        Advanced filter options (isExcludeMode).

      Returns Promise<string>

      The field name that the filter is applied on.

    • Sets the size information of a sheet. Note that if the sheet is a Worksheet, only SheetSizeBehavior.Automatic is allowed since you can't actually set a Worksheet to a fixed size.

      Parameters

      Returns Promise<SheetSize>

    • Returns Promise<Filter[]>

      The collection of filters used on the dashboard

    Properties

    index: number

    The index of the sheet within the published tabs. Note that hidden tabs are still counted in the ordering, as long as they are published.

    isActive: boolean

    A value indicating whether the sheet is the currently active sheet.

    isHidden: boolean

    A value indicating whether the sheet is hidden (true) or visible (false) in the UI. Note that if the entire tab control is hidden, it does not affect the state of this flag. This sheet may still report that it is visible even when the tabs control is hidden.

    name: string

    The name of the sheet.

    objects: DashboardObject[]

    The collection of objects contained in the dashboard.

    parentStoryPoint: null | StoryPoint

    Returns the StoryPoint object to which this Dashboard belongs. If the Dashboard doesn't belong to a story, it returns null.

    sheetType: SheetType

    The type of the sheet.

    size: SheetSize

    The size information that the author specified when publishing the workbook.

    url: string

    the URL for this sheet.

    workbook: Workbook

    The workbook containing this sheet

    worksheets: Worksheet[]

    This is a helper method and is equivalent to looping through all of the objects in a dashboard and collecting all of the objects whose type is worksheet. You can use this property to iterate through all of the worksheets in the dashboard.

    The collection of worksheets contained in the dashboard.

    The following example uses the JavaScript forEach() method to traverse the worksheets in the dashboard.


    let vizActiveSheet = viz.workbook.activeSheet;
    if (vizActiveSheet.sheetType === "dashboard") {
    vizActiveSheet.worksheets.forEach(function (worksheet) {
    // do something with the worksheets..
    })
    }