chart

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Methods added in v0.4.0

func Methods() []string

Methods returns module methods

func ModuleName added in v0.4.0

func ModuleName() string

ModuleName returns the module name

Types

type Chart

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

Chart represent Chart core module

func New

func New(logger *zap.Logger) *Chart

New creates new Chart core module

func (*Chart) GetLoader

func (ch *Chart) GetLoader(_ modules.Job) lua.LGFunction

GetLoader returns the lua loader

func (*Chart) Name

func (ch *Chart) Name() string

Name returns the module name

func (*Chart) Render

func (ch *Chart) Render(title string, data *Data, w io.Writer) error

Render the chart to the writer

func (*Chart) Stop

func (ch *Chart) Stop() error

Stop the module

type Data

type Data struct {
	Title  string
	Series []DataSeries
}

Data represents chart data

type DataItem

type DataItem struct {
	Timestamp float64
	Value     float64
}

DataItem represents data item

type DataSeries

type DataSeries struct {
	Color      string
	LineColor  string
	PointColor string
	Data       []DataItem
}

DataSeries represents data series

Jump to

Keyboard shortcuts

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