timeseries

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chart

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

Types

type Builder

type Builder struct {
	PluginSpec
}

func New

func New(options ...Option) (Builder, error)

type Legend

type Legend struct {
	Position LegendPosition          `json:"position" yaml:"position"`
	Mode     LegendMode              `json:"mode,omitempty" yaml:"mode,omitempty"`
	Size     LegendSize              `json:"size,omitempty" yaml:"size,omitempty"`
	Values   []commonSdk.Calculation `json:"values,omitempty" yaml:"values,omitempty"`
}

type LegendMode

type LegendMode string
const (
	ListMode  LegendMode = "list"
	TableMode LegendMode = "table"
)

type LegendPosition

type LegendPosition string
const (
	BottomPosition LegendPosition = "bottom"
	RightPosition  LegendPosition = "right"
)

type LegendSize

type LegendSize string
const (
	SmallSize  LegendSize = "small"
	MediumSize LegendSize = "medium"
)

type Option

type Option func(plugin *Builder) error

func Thresholds

func Thresholds(thresholds common.Thresholds) Option

func WithLegend

func WithLegend(legend Legend) Option

func WithTooltip

func WithTooltip(tooltip Tooltip) Option

func WithVisual

func WithVisual(visual Visual) Option

func WithYAxis

func WithYAxis(axis YAxis) Option

type Palette

type Palette struct {
	Mode PaletteMode `json:"mode" yaml:"mode"`
}

type PaletteMode

type PaletteMode string
const (
	AutoMode        PaletteMode = "auto"
	CategoricalMode PaletteMode = "categorical"
)

type PluginSpec

type PluginSpec struct {
	Legend     *Legend               `json:"legend,omitempty" yaml:"legend,omitempty"`
	Tooltip    *Tooltip              `json:"tooltip,omitempty" yaml:"tooltip,omitempty"`
	YAxis      *YAxis                `json:"yAxis,omitempty" yaml:"yAxis,omitempty"`
	Thresholds *commonSdk.Thresholds `json:"thresholds,omitempty" yaml:"thresholds,omitempty"`
	Visual     *Visual               `json:"visual,omitempty" yaml:"visual,omitempty"`
}

type Tooltip

type Tooltip struct {
	EnablePinning bool `json:"enablePinning,omitempty" yaml:"enablePinning,omitempty"`
}

type Visual

type Visual struct {
	Display      VisualDisplay    `json:"display,omitempty" yaml:"display,omitempty"`
	LineWidth    float64          `json:"lineWidth,omitempty" yaml:"lineWidth,omitempty"`
	AreaOpacity  float64          `json:"areaOpacity,omitempty" yaml:"areaOpacity,omitempty"`
	ShowPoints   VisualShowPoints `json:"showPoints,omitempty" yaml:"showPoints,omitempty"`
	Palette      Palette          `json:"palette,omitempty" yaml:"palette,omitempty"`
	PointRadius  float64          `json:"pointRadius,omitempty" yaml:"pointRadius,omitempty"`
	Stack        VisualStack      `json:"stack,omitempty" yaml:"stack,omitempty"`
	ConnectNulls bool             `json:"connectNulls,omitempty" yaml:"connectNulls,omitempty"`
}

type VisualDisplay

type VisualDisplay string
const (
	LineDisplay VisualDisplay = "line"
	BarDisplay  VisualDisplay = "bar"
)

type VisualShowPoints

type VisualShowPoints string
const (
	AutoShowPoints   VisualShowPoints = "auto"
	AlwaysShowPoints VisualShowPoints = "always"
)

type VisualStack

type VisualStack string
const (
	AllStack        VisualStack = "all"
	PercentageStack VisualStack = "percent"
)

type YAxis

type YAxis struct {
	Show   bool              `json:"show,omitempty" yaml:"show,omitempty"`
	Label  string            `json:"label,omitempty" yaml:"label,omitempty"`
	Format *commonSdk.Format `json:"format,omitempty" yaml:"format,omitempty"`
	Min    float64           `json:"min,omitempty" yaml:"min,omitempty"`
	Max    float64           `json:"max,omitempty" yaml:"max,omitempty"`
}

Jump to

Keyboard shortcuts

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