charts

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BarChart

func BarChart[T float64 | int](d RunStats[T]) *charts.Bar

func LineChart

func LineChart[T float64 | int](d RunStats[T]) *charts.Line

func ScatterChart

func ScatterChart(d ScatterData) *charts.Scatter

Types

type RunStat

type RunStat[T float64 | int] struct {
	RunID string
	Value *T
}

Use a pointer for the value so that missing values are properly represented. Otherwise they would default to zero, and that's not right.

type RunStats

type RunStats[T float64 | int] struct {
	Data  []RunStat[T]
	Label string
	Type  string
}

func (RunStats[T]) Plot

func (s RunStats[T]) Plot() (render.Renderer, error)

type ScatterData

type ScatterData struct {
	Data     []ScatterDatum
	XLabel   string
	YLabel   string
	Grouping string
}

func (ScatterData) Plot

func (d ScatterData) Plot() (render.Renderer, error)

type ScatterDatum

type ScatterDatum struct {
	X     float64
	Y     float64
	Color any
}

Jump to

Keyboard shortcuts

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