render

package
Version: v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 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
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL