sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Class DashboardComponent

An Angular component used for easily rendering a dashboard created in Sisense Fusion.

Note: Dashboard and Widget extensions based on JS scripts and add-ons in Fusion – for example, Blox and Jump To Dashboard – are not supported.

Example

<csdk-dashboard
 *ngIf="dashboard"
 [config]="dashboard.config"
 [defaultDataSource]="dashboard.defaultDataSource"
 [filters]="dashboard.filters"
 [layoutOptions]="dashboard.layoutOptions"
 [styleOptions]="dashboard.styleOptions"
 [title]="dashboard.title"
 [widgets]="dashboard.widgets"
 [widgetsOptions]="dashboard.widgetsOptions"
/>
import { Component } from '@angular/core';
import {
  type DashboardProps,
  DashboardService,
  dashboardModelTranslator,
} from '@sisense/sdk-ui-angular';

@Component({
 selector: 'app-dashboard',
 templateUrl: './dashboard.component.html',
 styleUrls: ['./dashboard.component.scss'],
})
export class DashboardComponent {

 dashboard: DashboardProps | null = null;

 constructor(private dashboardService: DashboardService) {}

 async ngOnInit(): Promise<void> {
   const dashboardModel = await this.dashboardService.getDashboardModel('your-dashboard-oid', { includeWidgets: true, includeFilters: true });
   this.dashboard = dashboardModelTranslator.toDashboardProps(dashboardModel);
 }

To learn more about this and related dashboard components, see Embedded Dashboards.

Implements

  • AfterViewInit
  • OnChanges
  • OnDestroy

Constructors

constructor

new DashboardComponent(sisenseContextService, themeService): DashboardComponent

Constructor for the Dashboard component.

Parameters

ParameterTypeDescription
sisenseContextServiceSisenseContextServiceSisense context service
themeServiceThemeServiceTheme service

Returns

DashboardComponent

Properties

Constructor

sisenseContextService

sisenseContextService: SisenseContextService

Sisense context service


themeService

themeService: ThemeService

Theme service

Other

config

config: DashboardConfig | undefined

The configuration for the dashboard


defaultDataSource

defaultDataSource: DataSource | undefined

The default data source to use for the dashboard


filters

filters: FilterRelations | Filter[] | undefined

The dashboard filters to be applied to each of the widgets based on the widget filter options


layoutOptions

layoutOptions: DashboardLayoutOptions | undefined

Dashboard layout options


styleOptions

styleOptions: DashboardStyleOptions | undefined

The style options for the dashboard


title

title: string | undefined

The title of the dashboard


widgets

widgets: WidgetProps[]

The widgets to render in the dashboard


widgetsOptions

widgetsOptions: WidgetsOptions | undefined

The options for each of the widgets

Last Updated: