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)
- Sheet
- Dashboard
Index
Methods
applyFilterAsync
- applyFilterAsync(
fieldName: string,
values: string[],
updateType: FilterUpdateType,
filterOptions: FilterOptions,
): Promise<string>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.
- fieldName: string
changeSizeAsync
getFiltersAsync
Returns Promise<Filter[]>
The collection of filters used on the dashboard
Properties
Readonlyindex
ReadonlyisActive
ReadonlyisHidden
Readonlyname
Readonlyobjects
ReadonlyparentStoryPoint
Returns
Returns the StoryPoint object to which this Dashboard belongs. If the Dashboard doesn't belong to a story, it returns null.
ReadonlysheetType
Readonlysize
Readonlyurl
Readonlyworkbook
Readonlyworksheets
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..
})
}
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.