graphs

package
v0.0.0-...-c88c7c2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultWidth            = 560
	DefaultHeight           = 114
	DefaultHeightWithLegend = 132

	DefaultScaleFactor = 1.0

	DefaultFontSize = 0.0

	DefaultColorBackground = Color{255, 255, 255, 1.0}
	DefaultColorForeground = Color{0, 0, 0, 1.0}

	DefaultGraphParams = GraphParams{
		Width:                   DefaultWidth,
		Height:                  DefaultHeight,
		ScaleFactor:             DefaultScaleFactor,
		FontSize:                DefaultFontSize,
		ColorBackground:         DefaultColorBackground,
		ColorForeground:         DefaultColorForeground,
		Legend:                  false,
		PreferDynamicAxisLimits: false,
	}

	DefaultGraphParamsWithLegend = GraphParams{
		Width:                   DefaultWidth,
		Height:                  DefaultHeightWithLegend,
		ScaleFactor:             DefaultScaleFactor,
		FontSize:                DefaultFontSize,
		ColorBackground:         DefaultColorBackground,
		ColorForeground:         DefaultColorForeground,
		Legend:                  true,
		PreferDynamicAxisLimits: false,
	}
)

Functions

func DrawBitsGraph

func DrawBitsGraph(out io.Writer, data models.Bins, params GraphParams) error

func DrawDownstreamErrorSecondsGraph

func DrawDownstreamErrorSecondsGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

func DrawDownstreamErrorsGraph

func DrawDownstreamErrorsGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

func DrawDownstreamRetransmissionGraph

func DrawDownstreamRetransmissionGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

func DrawHlogGraph

func DrawHlogGraph(out io.Writer, data models.Bins, params GraphParams) error

func DrawQLNGraph

func DrawQLNGraph(out io.Writer, data models.Bins, params GraphParams) error

func DrawSNRGraph

func DrawSNRGraph(out io.Writer, data models.Bins, params GraphParams) error

func DrawSNRGraphWithHistory

func DrawSNRGraphWithHistory(out io.Writer, data models.Bins, history models.BinsHistory, params GraphParams) error

func DrawUpstreamErrorSecondsGraph

func DrawUpstreamErrorSecondsGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

func DrawUpstreamErrorsGraph

func DrawUpstreamErrorsGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

func DrawUpstreamRetransmissionGraph

func DrawUpstreamRetransmissionGraph(out io.Writer, data models.ErrorsHistory, params GraphParams) error

Types

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A float64
}

func (Color) CSS

func (c Color) CSS() template.CSS

func (Color) ColorHex

func (c Color) ColorHex() string

func (Color) Opacity

func (c Color) Opacity() string

func (Color) String

func (c Color) String() string

type GraphParams

type GraphParams struct {
	Width                   int
	Height                  int
	ScaleFactor             float64
	FontSize                float64
	ColorBackground         Color
	ColorForeground         Color
	Legend                  bool
	PreferDynamicAxisLimits bool
}

type Legend

type Legend struct {
	Title string
	Items []LegendItem
}

func GetBitsGraphLegend

func GetBitsGraphLegend() Legend

func GetDownstreamErrorSecondsGraphLegend

func GetDownstreamErrorSecondsGraphLegend() Legend

func GetDownstreamErrorsGraphLegend

func GetDownstreamErrorsGraphLegend() Legend

func GetDownstreamRetransmissionGraphLegend

func GetDownstreamRetransmissionGraphLegend() Legend

func GetHlogGraphLegend

func GetHlogGraphLegend() Legend

func GetQLNGraphLegend

func GetQLNGraphLegend() Legend

func GetSNRGraphLegend

func GetSNRGraphLegend() Legend

func GetSNRGraphWithHistoryLegend

func GetSNRGraphWithHistoryLegend() Legend

func GetUpstreamErrorSecondsGraphLegend

func GetUpstreamErrorSecondsGraphLegend() Legend

func GetUpstreamErrorsGraphLegend

func GetUpstreamErrorsGraphLegend() Legend

func GetUpstreamRetransmissionGraphLegend

func GetUpstreamRetransmissionGraphLegend() Legend

type LegendItem

type LegendItem struct {
	Color Color
	Text  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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