Help us shape the future of Go! Take the 2026 Go Developer Survey

vadvisor

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeriesField = "seriesField"
	XField      = "xField"
	YField      = "yField"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AxesStruct

type AxesStruct[Y Numeric] struct {
	Orient    string `json:"orient"`
	AliasName string `json:"_alias_name"`
	Range     struct {
		Min Y `json:"min"`
		Max Y `json:"max"`
	} `json:"range"`
}

type DataStruct

type DataStruct[X, Y Numeric] struct {
	Values []*DataValue[X, Y] `json:"values"`
}

type DataValue

type DataValue[X, Y Numeric] struct {
	SeriesField string `json:"seriesField"`
	XField      X      `json:"xField"`
	YField      Y      `json:"yField"`
}

type LegentConf

type LegentConf struct {
	Type    string       `json:"type"`
	Visible bool         `json:"visible"`
	Orient  string       `json:"orient"`
	Pager   *PagerStruct `json:"pager"`
}

type LineConf

type LineConf struct {
	Style *LineStyle `json:"style"`
}

type LineStyle

type LineStyle struct {
	CurveType string `json:"curveType"`
}

type MultiSeriesLineGraph

type MultiSeriesLineGraph[X, Y Numeric] struct {
	Type  string `json:"type"`
	Title struct {
		Text string `json:"text"`
	} `json:"title"`
	Point       *PointConf        `json:"point"`
	Line        *LineConf         `json:"line"`
	Legends     *LegentConf       `json:"legends"`
	Data        *DataStruct[X, Y] `json:"data"`
	XField      string            `json:"xField"`
	YField      string            `json:"yField"`
	SeriesField string            `json:"seriesField"`
	InvalidType string            `json:"invalidType"`
	Axes        []*AxesStruct[Y]  `json:"axes"`
	Stack       bool              `json:"stack"`
}

func NewMultiSeriesLineGraph

func NewMultiSeriesLineGraph[X, Y Numeric]() *MultiSeriesLineGraph[X, Y]

func (*MultiSeriesLineGraph[X, Y]) AddData

func (g *MultiSeriesLineGraph[X, Y]) AddData(x X, y Y, seriesField string) *MultiSeriesLineGraph[X, Y]

func (*MultiSeriesLineGraph[X, Y]) SetRange

func (g *MultiSeriesLineGraph[X, Y]) SetRange(min, max Y) *MultiSeriesLineGraph[X, Y]

func (*MultiSeriesLineGraph[X, Y]) SetStack

func (g *MultiSeriesLineGraph[X, Y]) SetStack() *MultiSeriesLineGraph[X, Y]

func (*MultiSeriesLineGraph[X, Y]) SetTitle

func (g *MultiSeriesLineGraph[X, Y]) SetTitle(title string) *MultiSeriesLineGraph[X, Y]

func (*MultiSeriesLineGraph[X, Y]) String

func (g *MultiSeriesLineGraph[X, Y]) String() string

type Numeric

type Numeric interface {
	constraints.Integer | constraints.Float | string
}

type PagerStruct

type PagerStruct struct {
	Type string `json:"type"`
}

type PointConf

type PointConf struct {
	Style *PointStyle `json:"style"`
}

type PointStyle

type PointStyle struct {
	Size int `json:"size"`
}

Jump to

Keyboard shortcuts

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