core

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment int
const (
	AlignmentLeft Alignment = iota
	AlignmentRight
	AlignmentCenter
)

type ChartGraphic

type ChartGraphic interface {
	Context() Context
	Render(w io.Writer) error
}

type ChartType

type ChartType int
const (
	TypeTreeMap ChartType = iota
)

func (ChartType) String

func (t ChartType) String() string

type CommonGraphic

type CommonGraphic interface {
	Draw(canvas *svg.SVG) error
}

type Context

type Context interface {
	CanvasSize() (int, int)
	Title() string
	TitleFontSize() int
	ChartSize() (int, int)
	ChartOffset() (int, int)
	Labels() []string
	LabelFontSize() int
	LabelFontColor() Hex
	SeriesCount() int
	Series(index int) Series
	FirstSeries() Series
	SeriesColors(index int) []Hex
	LegendTitle() string
	LegendPosition() Position
	YAxisTitle() string
	XAxisTitle() string
}

type Hex

type Hex string

type Position

type Position int
const (
	PositionTop Position = iota
	PositionBottom
	PositionLeft
	PositionRight
)

type RGB

type RGB struct {
	R int
	G int
	B int
}

func Hex2RGB

func Hex2RGB(hex Hex) (RGB, error)

func (RGB) String

func (rgb RGB) String() string

type Series

type Series interface {
	Name() string
	Data() []interface{}
	Float64Data() ([]float64, error)
	Colors() []Hex
}

type SeriesGroup

type SeriesGroup []*Series

func (SeriesGroup) Series

func (g SeriesGroup) Series(i int) *Series

func (SeriesGroup) Size

func (g SeriesGroup) Size() int

Jump to

Keyboard shortcuts

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