The base class for all dashboard widget components.
Namespace: MindFusion.Dashboards
File: DashboardWidget.js
SyntaxJavaScript
Copy Code
|
|---|
// class |
RemarksDashboardWidget is the abstract base class for all visual components hosted within a dashboard. You cannot use it directly; instead, instantiate one of its specialized derived classes - such as KpiWidget, ChartWidget, GaugeWidget, GridWidget, CalendarWidget, ClockWidget, DiagramWidget, MapWidget, LabelWidget, or ImageWidget. You can also create bespoke widget types by subclassing DashboardWidget.
Every widget connects to the dashboard's data layer using the dataSource and dataPath properties:
The visual representation of a widget is created in the draw method, which returns an HTMLElement tree. When a widget's underlying data or properties change, calling invalidate schedules a UI repaint.
Widgets are wrapped inside a DashboardWidgetContainer by the layout engine. The container applies the card surface styles (background colors, borders, elevation shadows) defined by the active theme.
To enable live inspection in DashboardMode.Edit, widgets implement getMetadata. This method returns property metadata describing the widget's configurable fields, data types, and property grid categories.
Subclasses should override toJson and fromJson to serialize their custom properties alongside the standard widget attributes (id, cssClass, dataSource, dataPath).
Inheritance HierarchyMindFusion.Dashboards.DashboardWidget
MindFusion.Dashboards.CalendarWidget
MindFusion.Dashboards.ChartWidget
MindFusion.Dashboards.ClockWidget
MindFusion.Dashboards.DiagramWidget
MindFusion.Dashboards.GaugeWidget
MindFusion.Dashboards.GridWidget
MindFusion.Dashboards.ImageWidget
MindFusion.Dashboards.KpiWidget
MindFusion.Dashboards.LabelWidget
MindFusion.Dashboards.MapWidget
MindFusion.Dashboards.PropertyGridWidget
See Also