threshold

package
v0.21.10 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayStyle

type DisplayStyle string

DisplayStyle represents how the threshold should be visualized.

const (
	Off             DisplayStyle = "off"
	AsFilledRegions DisplayStyle = "area"
	AsLines         DisplayStyle = "line"
	Both            DisplayStyle = "line+area"
)

type Mode

type Mode string

Mode represents the type of value used as threshold.

const (
	Percentage Mode = "percentage"
	Absolute   Mode = "absolute"
)

type Option

type Option func(threshold *Threshold)

Option represents an option that can be used to configure an axis.

func BaseColor

func BaseColor(color string) Option

BaseColor defines the color of the thresholds' base.

func Steps

func Steps(steps ...Step) Option

Steps defines threshold steps.

func Style

func Style(style DisplayStyle) Option

Style defines the thresholds display style.

func ValueMode

func ValueMode(mode Mode) Option

ValueMode defines how to interpret the threshold values.

type Step

type Step struct {
	Color string
	Value float64
}

type Threshold

type Threshold struct {
	// contains filtered or unexported fields
}

Threshold represents a threshold visualization.

func New

func New(fieldConfig *sdk.FieldConfig, options ...Option) *Threshold

New creates a new Threshold configuration.

Jump to

Keyboard shortcuts

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