Represents the data model for a dashboard, containing the collection of widgets.
Namespace: MindFusion.Dashboards
File: Dashboard.js
SyntaxJavaScript
Copy Code
|
|---|
// class |
RemarksThe Dashboard class represents the document data model of a dashboard. It maintains the collection of active widgets, manages data retrieval through its DataSourceRegistry, coordinates widget template registrations via WidgetRegistry, and handles data-level serialization.
Widgets are added to the model by calling the addWidget method. When working with the default GridLayout, addWidget accepts the target widget along with its column, row, columnSpan, and rowSpan coordinates:
JavaScript
Copy Code
|
|---|
dashboard.addWidget(kpiWidget, 0, 0, 1, 1); |
Data sources used by widgets are managed through the dataSources property, which returns the dashboard's DataSourceRegistry. When a registered DataSource refreshes, the Dashboard automatically notifies any widgets bound to that source's identifier, triggering targeted UI updates without requiring a full page reload.
The Dashboard class exposes several event dispatchers for monitoring lifecycle changes:
Inheritance HierarchyMindFusion.Dashboards.Dashboard
See Also