Represents the main view and controller for a dashboard.
Namespace: MindFusion.Dashboards
File: DashboardView.js
SyntaxJavaScript
Copy Code
|
|---|
// class |
RemarksDashboardView is the top-level visual host control that attaches to an HTML DOM container element and manages the presentation, user interaction, theme synchronization, and layout execution of a dashboard. It acts as the primary entry point for integrating dashboards into web applications.
You instantiate a DashboardView by calling the static create method or invoking the constructor with a target HTML element:
JavaScript
Copy Code
|
|---|
var view = MindFusion.Dashboards.DashboardView.create(document.getElementById("dashboard")); |
The underlying data model is accessed through the dashboard property, an instance of the Dashboard class. A single Dashboard model can be shared between multiple views if necessary.
The theme property gets or sets the visual theme of the dashboard and its contained widgets. Assigning a theme name (such as "standard", "light", or "dark") updates the DOM classes on the host element, notifies all hosted widgets, and automatically synchronizes child palette and inspector panels.
To persist and restore dashboard configurations, use the toJson and fromJson methods. They serialize the active layout type, grid matrix dimensions, widget positions, and all internal widget settings into a JSON-compatible object.
The layout property specifies the active layout strategy, defined by the DashboardLayout enumeration (Grid or Diagram). The autoGrow property indicates whether the dashboard automatically generates additional grid rows when widgets are placed beyond the current row boundaries.
Inheritance HierarchyMindFusion.Dashboards.Control![]()
MindFusion.Dashboards.UIControl
MindFusion.Dashboards.DashboardView
See Also