Widgets are the visual building blocks of a MindFusion dashboard. Every widget derives from the base DashboardWidget class and encapsulates a specialized component from the MindFusion JavaScript suite.
All widgets support automatic data binding via the DataSourceRegistry, respond dynamically to the active ThemeManager theme, and can be configured interactively using the PropertyGrid.
KpiWidget (Key Performance Indicators)
The KpiWidget displays high-impact numeric metrics, trend percentages, and executive status badges.
Key Properties:
- dataPath: Binding path to the primary numeric or currency metric (e.g., "$18.87M", "99.4%").
- headerPath, headerText: Top label describing the metric (e.g., "NET PROFIT", "ACTIVE USERS").
- footerPath, footerText: Bottom descriptive text or comparative timestamp (e.g., "vs Last Quarter").
- changePath, changeText: The delta value or percentage difference (e.g., "+18.5%", "-2.4%").
JavaScript
Copy Code
|
|---|
var kpi = new MindFusion.Dashboards.KpiWidget(); kpi.headerText = "Total Revenue"; kpi.dataPath = "sales.revenue"; kpi.footerText = "vs Previous Month"; dashView.addWidget(kpi, 0, 0, 1, 1); |

ChartWidget (Data Visualizations)
The ChartWidget embeds the full MindFusion.Charting engine into a dashboard card.
Key Properties:
- chartType: A member of the ChartType enumeration defining the visualization style:
- ChartType.Bar: Side-by-side, stacked, or overlay bar charts.
- ChartType.Line: Polyline, smooth curve, or step line charts.
- ChartType.Area: Semi-transparent single or multi-series area charts.
- ChartType.Pie: Slices, callouts, and doughnut charts.
- ChartType.Funnel: Pipeline conversion progression stages.
- ChartType.Radar: Multi-dimensional radar and spider charts.
- ChartType.Scatter: 2D Cartesian scatter plots with configurable marker shapes and sizes.
- ChartType.Candlestick: Financial stock charts with open, high, low, and close bars.
- ChartType.Tower: 3D bar towers.
- ChartType.Heatmap: Color-mapped matrix grids. - series: An array of DashboardSeries objects binding the chart to specific data source fields.
- showLegend: Boolean indicating whether to draw the chart legend.
- legendTitle: String title displayed above legend swatches.
- showDataLabels: A member of the LabelKinds enumeration (None, InnerLabel, OuterLabel, All).
- doughnut: Boolean indicating whether Pie charts render with an inner cutout hole.
- scatterShapeSize: Number specifying the diameter in pixels of scatter markers.
JavaScript
Copy Code
|
|---|
var chart = new MindFusion.Dashboards.ChartWidget(); chart.chartType = MindFusion.Dashboards.ChartType.Bar; chart.dataSource = "sales-data"; chart.series = [ { name: "Electronics", dataPath: "sales", valuePath: "revenue", labelPath: "month" } ]; dashView.addWidget(chart, 1, 0, 3, 2); |

GaugeWidget (Radial & Linear Meters)
The GaugeWidget embeds the MindFusion.Gauges controls to display dial needles, progress tracks, and operational capacity ranges.
Key Properties:
- gaugeType: A member of the GaugeType enumeration:
- GaugeType.Circle: Full 360-degree circular dial.
- GaugeType.Semicircle: 180-degree half-circle arch meter.
- GaugeType.Horizontal: Linear horizontal bar meter.
- GaugeType.Vertical: Linear vertical bar meter. - valuePath: Binding path to the current value.
- minValue, minPath: The minimum numeric value of the scale.
- maxValue, maxPath: The maximum numeric value of the scale.
- targetValue, targetPath: An optional target threshold marker.
- margin: Padding in pixels between the gauge face and the widget card border.
- horizontalMargin / verticalMargin: Independent 2D margins for fine-tuning gauge placement.
JavaScript
Copy Code
|
|---|
var gauge = new MindFusion.Dashboards.GaugeWidget(); gauge.gaugeType = MindFusion.Dashboards.GaugeType.Circle; gauge.minValue = 0; gauge.maxValue = 100; gauge.dataSource = "telemetry"; gauge.valuePath = "cpuUsage"; dashView.addWidget(gauge, 4, 0, 2, 2); |

GridWidget (Interactive Data Tables)
The
GridWidget embeds a virtualized MindFusion.DataViews
Grid capable of rendering thousands of rows with sorting, filtering, editing, and selection.
Key Properties:
JavaScript
Copy Code
|
|---|
var gridWidget = new MindFusion.Dashboards.GridWidget(); gridWidget.dataSource = "orders"; gridWidget.dataPath = "items"; dashView.addWidget(gridWidget, 0, 2, 6, 3); |

CalendarWidget (Scheduling & Events)
The CalendarWidget embeds the MindFusion.Scheduling engine, displaying calendars, appointment timetables, resource assignments, and project milestone views.
Key Properties:

DiagramWidget (Flow Diagrams)
DiagramWidget displays flow diagrams (flowcharts, networks, trees, etc) created using MindFusion.Diagramming API. Its dataPath should be set to the result of Diagram.toJsonObject call. Alternatively, you can populate the diagram from custom data, either by overriding the refresh method to render real-time data, or by handling widgetLoaded event and rendering a static diagram.

ClockWidget (Analog & Digital Clocks)
The ClockWidget provides real-time timekeeping.
- clockType: ClockType.Analog (rotating second, minute, and hour hands) or ClockType.Digital (seven-segment LED display).
- timeZone: Timezone offset or string identifier.

MapWidget (Geographical Mapping)
The MapWidget embeds MindFusion.Mapping to display interactive geographical maps, supporting data overlays and marker pins.

LabelWidget & ImageWidget
- LabelWidget: Renders formatted title banners, section headers, or markdown documentation blocks.
- ImageWidget: Embeds company logos, asset schematics, product photos, or SVG vector icons.
