All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ViewerApiExtensionEvents Type

Describes events this extension fires.

Declaration

export type ViewerApiExtensionEvents = {
    itemClick: ItemClickEventArgs;
    itemSelectionChanged: ItemSelectionChangedEventArgs;
    itemWidgetCreated: ItemWidgetEventArgs;
    itemWidgetUpdating: ItemWidgetEventArgs;
    itemWidgetUpdated: ItemWidgetEventArgs;
    itemWidgetOptionsPrepared: ItemWidgetOptionEventArgs;
    itemElementCustomColor: ItemElementCustomColorEventArgs;
    itemVisualInteractivity: ItemVisualInteractivityEventArgs;
    itemMasterFilterStateChanged: ItemMasterFilterStateChangedEventArgs;
    itemDrillDownStateChanged: ItemDrillDownStateChangedEventArgs;
    itemActionAvailabilityChanged: ItemActionAvailabilityChangedEventArgs;
    itemCaptionToolbarUpdated: ItemCaptionToolbarUpdatedEventArgs;
    dashboardTitleToolbarUpdated: DashboardTitleToolbarUpdatedEventArgs;
    selectedTabPageChanged: SelectedTabPageChangedEventArgs;
}

Members

Name Type Description
dashboardTitleToolbarUpdated DashboardTitleToolbarUpdatedEventArgs

A handler for the event that occurs before the dashboard title toolbar is updated.

itemActionAvailabilityChanged ItemActionAvailabilityChangedEventArgs

A handler for the event that occurrs after the available interactivity actions for the specific dashboard item changes.

itemCaptionToolbarUpdated ItemCaptionToolbarUpdatedEventArgs

A handler for the event that occurs before the dashboard item caption toolbar is updated.

itemClick ItemClickEventArgs

A handler for the event that occurs when a user clicks a dashboard item.

itemDrillDownStateChanged ItemDrillDownStateChangedEventArgs

A handler for the event that occurs when a drill-down/drill-up is performed.

itemElementCustomColor ItemElementCustomColorEventArgs

A handler for the event that allows you to paint the dashboard item elements with the specified colors.

itemMasterFilterStateChanged ItemMasterFilterStateChangedEventArgs

A handler for the event that occurs when the master filter state is changed.

itemSelectionChanged ItemSelectionChangedEventArgs

A handler for the event that occurs after the selection within the dashboard item is changed.

itemVisualInteractivity ItemVisualInteractivityEventArgs

A handler for the event that allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting.

itemWidgetCreated ItemWidgetEventArgs

A handler for the event that allows you to access underlying UI/Data Visualization widgets.

itemWidgetOptionsPrepared ItemWidgetOptionEventArgs

A handler for the event that allows you to access underlying UI/Data Visualization widgets and configure their options.

itemWidgetUpdated ItemWidgetEventArgs

A handler for the event that allows you to access underlying UI/Data Visualization widgets.

itemWidgetUpdating ItemWidgetEventArgs

A handler for the event that allows you to access underlying UI/Data Visualization widgets.

selectedTabPageChanged SelectedTabPageChangedEventArgs

A handler for the event that occurs when the selected tab page is changed.

Remarks

Find the extension by its name (viewerApi) and pass the event handler’s name to subscribe to the ViewerApiExtension events.

The following code handles the onDashboardTitleToolbarUpdated event:

function onBeforeRender(dashboardControl) {
  let viewerApiExtension = dashboardControl.findExtension("viewerApi");
  if (viewerApiExtension) {
    viewerApiExtension.on('dashboardTitleToolbarUpdated', customizeDashboardTitleToolbar);
  }
}
function customizeDashboardTitleToolbar(args) {
  // ...
}