Gauge
Usage
gauge := components.NewGauge(). SetLabel("CPU"). SetValue(0.72). SetUnit("%")
fmt.Println(gauge != nil)Methods
| Method | Signature | Description |
|---|---|---|
GetFieldHeight | func (g *Gauge) GetFieldHeight() int | GetFieldHeight returns the preferred height. |
SetLabel | func (g *Gauge) SetLabel(label string) *Gauge | SetLabel sets the label displayed below the gauge. |
SetMaxValue | func (g *Gauge) SetMaxValue(max float64) *Gauge | SetMaxValue sets the max value for display purposes. |
SetUnit | func (g *Gauge) SetUnit(unit string) *Gauge | SetUnit sets the unit displayed with the value. |
SetValue | func (g *Gauge) SetValue(value float64) *Gauge | SetValue sets the gauge value (0.0 to 1.0). |