Search
Interactivity and Palette

MindFusion.Dashboards includes built-in interactive designer tooling that enables end users and administrators to build, customize, and rearrange dashboards directly in the browser.

Enabling Designer Mode

By default, the dashboard operates in DashboardMode.View. Setting the mode property to DashboardMode.Edit activates the visual authoring environment:

JavaScript  Copy Code

dashView.mode = MindFusion.Dashboards.DashboardMode.Edit;

In edit mode:

  • The DashboardPalette sidebar opens on the left.
  • The PropertyGrid inspector opens on the right.
  • Unoccupied grid cells display dashed drop targets.
  • Occupied widget cards display interactive drag handles and focus outlines.

The Dashboard Palette

The DashboardPalette is a collapsible accordion sidebar that categorizes available widget templates (KPIs, Charts, Gauges, Grids, Clocks, etc.).

Users can drag any widget template from the palette and drop it directly onto an empty grid cell. The dashboard automatically instantiates the widget, assigns default configurations, and wraps it in a DashboardWidgetContainer.

Customizing Palette Categories:

JavaScript  Copy Code

// Register custom widget templates under a designated category
dashView.dashboard.registry.register('exec-kpi',
    () => new MindFusion.Dashboards.KpiWidget(),
    { displayName: 'Executive KPI', category: 'Executive Metrics' }
);

// Refresh the palette to render the new category and its widget templates
dashView.widgetPalette.populate();

Selecting Widgets and Focus State

Clicking any widget in edit mode applies the mfc-active CSS class to its container, highlighting it with a distinct selection ring.

The selected widget is automatically set as the selectedObject of the PropertyGrid inspector.

Live Editing with the PropertyGrid

The PropertyGrid automatically inspects the active widget by querying its getMetadata() implementation.

Supported property inspector categories:

  • Layout: Column, Row, ColumnSpan, RowSpan.
  • Data Binding: DataSource, DataPath, ValuePath, LabelPath.
  • Visual Styling: ChartType, Doughnut, LineType, Legend, ShowDataLabels.
  • Gauge Properties: GaugeType, MinValue, MaxValue, TargetValue, Margins.

Edits made within the PropertyGrid update the widget in real time without reloading the page.

Keyboard Shortcuts & Deletion

When a widget card is active in edit mode:
  • Pressing Delete or Backspace immediately removes the widget from the dashboard.
  • The grid cell reverts to an empty drop target.
  • The PropertyGrid resets its selection to null.