Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Dashboard

Hierarchy

Index

Properties

index

index: number
returns

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

isActive: boolean
returns

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

isHidden

isHidden: boolean
returns

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

name: string
returns

The name of the sheet.

objects

objects: Array<DashboardObject>
returns

The collection of objects contained in the dashboard.

parentStoryPoint

parentStoryPoint: StoryPoint | null
returns

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

sheetType

sheetType: SheetType
returns

The type of the sheet.

size

size: SheetSize
returns

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

url

url: string
returns

the URL for this sheet.

workbook

workbook: Workbook
returns

The workbook containing this sheet

worksheets

worksheets: Array<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.

returns

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..
   })
}

Methods

applyFilterAsync

  • 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: Array<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.

changeSizeAsync

  • 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>

getFiltersAsync

  • getFiltersAsync(): Promise<Array<Filter>>
  • Returns Promise<Array<Filter>>

    The collection of filters used on the dashboard