igLinearGauge
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
The igLinearGauge is useful for showing a single measure on a linear range.
- C#
- VB.NET
public class igLinearGauge : igBase
Public Class igLinearGauge
Inherits igBase
Constructors
igLinearGauge()
Constructs a new instance of the igLinearGauge class.
Example:
The following example creates a linear gauge, sets its scale through the Options object and its value through the Value property.
var gauge = new igLinearGauge();
gauge.Options.minimumValue = 0;
gauge.Options.maximumValue = 100;
gauge.Value = 42;
gauge.IsNeedleDraggingEnabled = true;
gauge.Size = new Size(400, 80);
this.Controls.Add(gauge);
igLinearGauge(options)
Constructs a new instance of the igLinearGauge class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options passed to the igLinearGauge widget: an anonymous object, a JSON string or a dynamic object. |
Example:
The following example creates a linear gauge with a scale from 0 to 100 divided in two colored ranges.
var gauge = new igLinearGauge(new
{
minimumValue = 0,
maximumValue = 100,
value = 42,
interval = 10,
ranges = new[]
{
new { name = "normal", startValue = 0, endValue = 70, brush = "#7BA05B" },
new { name = "critical", startValue = 70, endValue = 100, brush = "#C62828" }
}
});
gauge.Size = new Size(400, 80);
this.Controls.Add(gauge);
Properties
IsNeedleDraggingEnabled
Boolean: Returns or sets whether the user can change the value of the gauge by dragging the needle.
The property reads and writes the isNeedleDraggingEnabled field of the Options object and returns false when the option is not set.
Value
Double: Returns or sets the value displayed by the needle of the gauge.
The property reads and writes the value field of the Options object and returns 0 when the option is not set. It is not updated when the user drags the needle in the browser.