fields

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldType

type FieldType string
const (
	FieldTypeTime FieldType = "time"
)

type Matcher

type Matcher func(field *sdk.FieldConfigOverride)

func ByName

func ByName(name string) Matcher

ByName matches a specific field name.

func ByQuery

func ByQuery(ref string) Matcher

ByQuery matches all fields returned by the given query.

func ByRegex

func ByRegex(regex string) Matcher

ByRegex matches fields names using a regex.

func ByType

func ByType(fieldType FieldType) Matcher

ByType matches fields with a specific type.

type OverrideOption

type OverrideOption func(field *sdk.FieldConfigOverride)

func AxisPlacement

func AxisPlacement(placement axis.PlacementMode) OverrideOption

AxisPlacement overrides how the axis should be placed in the panel.

func FillOpacity

func FillOpacity(opacity int) OverrideOption

FillOpacity overrides the opacity.

func FixedColorScheme

func FixedColorScheme(color string) OverrideOption

FixedColorScheme forces the use of a fixed color scheme.

func NegativeY

func NegativeY() OverrideOption

NegativeY flips the results to negative values on the Y axis.

func Stack

func Stack(mode StackMode) OverrideOption

Stack overrides if the series should be stacked and using which mode (default not stacked).

func Unit

func Unit(unit string) OverrideOption

Unit overrides the unit.

type StackMode

type StackMode string

StackMode configures mode of series stacking. FIXME: copied here to avoid circular imports with parent package

const (
	// Unstacked will not stack series
	Unstacked StackMode = "none"
	// NormalStack will stack series as absolute numbers
	NormalStack StackMode = "normal"
	// PercentStack will stack series as percents
	PercentStack StackMode = "percent"
)

Jump to

Keyboard shortcuts

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