graph

package
v0.0.0-...-f243925 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPodDataPoints

func AddPodDataPoints(graph *Model, prefix string, x float64, podSpec *v1.PodSpec, options *Series)

Types

type Axis

type Axis struct {
	Label string `json:"label"`
}

type BuilderFunction

type BuilderFunction func() (*Model, error)

type Graphable

type Graphable interface {
	ListGraphs() ([]*Metadata, error)
}

type Metadata

type Metadata struct {
	Key     string `json:"key"`
	Builder BuilderFunction
}

type Model

type Model struct {
	XAxis  Axis      `json:"xAxis"`
	YAxis  Axis      `json:"yAxis"`
	Series []*Series `json:"series"`
}

func (*Model) GetSeries

func (g *Model) GetSeries(key string, options *Series) *Series

type Series

type Series struct {
	Key    string  `json:"key"`
	Units  string  `json:"units"`
	Values []Value `json:"values"`

	StrokeWidth float32 `json:"strokeWidth,omitempty"`
	Classed     string  `json:"classed,omitempty"`

	// Area will fill the area under the line
	Area bool `json:"area,omitempty"`
}

func (*Series) AddXYPoint

func (s *Series) AddXYPoint(x float64, y float64)

type Value

type Value struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳