Search
GaugeWidget Class
Remarks See Also
 






Represents a dashboard widget that displays a MindFusion Gauges control.

Namespace: MindFusion.Dashboards
File: GaugeWidget.js

 Syntax

JavaScript  Copy Code

// class
GaugeWidget.prototype = {}

 Remarks

GaugeWidget embeds the MindFusion.Gauges component to display dial meters, needle pointers, and linear progress tracks. It is widely used for operational capacity meters, speedometers, temperature monitors, and KPI thresholds.

The gauge style is specified using the gaugeType property, defined by the GaugeType enumeration:

  • Circle: A full 360-degree circular dial meter.
  • Semicircle: A 180-degree half-circle arch meter (optimized for top-edge dashboard cards).
  • Horizontal: A horizontal linear bar gauge.
  • Vertical: A vertical linear bar gauge.

Scale ranges are defined by minValue and maxValue (or dynamic minPath and maxPath). The current needle position is driven by valuePath. An optional target indicator can be displayed using targetValue or targetPath.

Spacing between the gauge face and the widget card border is fine-tuned using:

  • margin: Uniform padding in pixels applied to all four sides.
  • horizontalMargin: Independent horizontal margin for widening or centering meters.
  • verticalMargin: Independent vertical margin for vertical centering.

Gauge needles, scale rims, tick marks, and background plates inherit their colors from the active theme's CSS custom properties (--mfg-*), ensuring high contrast across standard, light, and dark modes.

 Inheritance Hierarchy

MindFusion.Dashboards.DashboardWidget
    MindFusion.Dashboards.GaugeWidget

 See Also