render

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFmt = "2006-01"
)

Variables

View Source
var (
	StandardColors = []color.Color{}
)

Functions

func AutoStyle added in v0.3.0

func AutoStyle(i int) (style chart.Style)

func ChartRender

func ChartRender(w io.Writer, data ChartData) error

func DecodeYearMonth

func DecodeYearMonth(i int) time.Time

func EncodeYearMonth

func EncodeYearMonth(t time.Time) int

Types

type ChartData

type ChartData struct {
	Title        string
	TimeMessage  string
	ValueMessage string
	Width        int
	Height       int
	MaxValue     int
	Series       []Series
}

type Point

type Point struct {
	Time  time.Time
	Value int
}

func (Point) String

func (p Point) String() string

type Points

type Points []Point

func (Points) Values

func (p Points) Values() (points []chart.Point)

type Series

type Series struct {
	Name   string
	Points Points
	Index  int
}

Jump to

Keyboard shortcuts

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