ts

package
v0.0.0-...-1775924 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ts can be used to draw time series plots.

Index

Constants

This section is empty.

Variables

View Source
var Line = SVGPlot{
	// contains filtered or unexported fields
}
View Source
var Scatter = SVGPlot{
	// contains filtered or unexported fields
}
View Source
var SparkLineAll = SVGSpark{
	// contains filtered or unexported fields
}
View Source
var SparkLineLatest = SVGSpark{
	// contains filtered or unexported fields
}
View Source
var SparkLineNone = SVGSpark{
	// contains filtered or unexported fields
}
View Source
var SparkScatterAll = SVGSpark{
	// contains filtered or unexported fields
}
View Source
var SparkScatterLatest = SVGSpark{
	// contains filtered or unexported fields
}
View Source
var SparkScatterNone = SVGSpark{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type Plot

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

func (*Plot) AddSeries

func (p *Plot) AddSeries(s Series)

func (*Plot) SetMeanStddev

func (p *Plot) SetMeanStddev(m, s float64)

func (*Plot) SetScheme

func (p *Plot) SetScheme(s string)

func (*Plot) SetTitle

func (p *Plot) SetTitle(title string)

func (*Plot) SetUnit

func (p *Plot) SetUnit(unit string)

func (*Plot) SetXAxis

func (p *Plot) SetXAxis(min, max time.Time)

Auto ranges on data if not set.

func (*Plot) SetYAxis

func (p *Plot) SetYAxis(min, max float64)

Auto ranges on the data if not set.

func (*Plot) SetYLabel

func (p *Plot) SetYLabel(yLabel string)

func (*Plot) SetYRange

func (p *Plot) SetYRange(r float64)

SetYRange sets ymin, ymax as r about the mid point of the data.

type Point

type Point struct {
	DateTime time.Time
	Value    float64
	Error    float64
}

type SVGPlot

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

func (*SVGPlot) Draw

func (s *SVGPlot) Draw(p Plot, b *bytes.Buffer) error

type SVGSpark

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

func (*SVGSpark) Draw

func (s *SVGSpark) Draw(p Plot, b *bytes.Buffer) error

type Series

type Series struct {
	Points []Point
	Label  string
}

Jump to

Keyboard shortcuts

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