gauge

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const PluginKind = "GaugeChart"

Variables

This section is empty.

Functions

func Chart

func Chart(options ...Option) panel.Option

Types

type Builder

type Builder struct {
	PluginSpec `json:",inline" yaml:",inline"`
}

type LegendSpec added in v0.12.1

type LegendSpec struct {
	Show bool `json:"show" yaml:"show"`
}

type Option

type Option func(plugin *Builder) error

func Calculation

func Calculation(calculation common.Calculation) Option

func Format

func Format(format common.Format) Option

func Legend added in v0.12.1

func Legend(legend LegendSpec) Option

func Max

func Max(max float64) Option

func Thresholds

func Thresholds(thresholds common.Thresholds) Option

type PluginSpec

type PluginSpec struct {
	Calculation common.Calculation `json:"calculation" yaml:"calculation"`
	Format      *common.Format     `json:"format,omitempty" yaml:"format,omitempty"`
	Thresholds  *common.Thresholds `json:"thresholds,omitempty" yaml:"thresholds,omitempty"`
	Max         float64            `json:"max,omitempty" yaml:"max,omitempty"`
	Legend      *LegendSpec        `json:"legend,omitempty" yaml:"legend,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL