png

package
v0.0.0-...-fd21f57 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PNG

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

PNG implements the chart interface to write PNG images.

func New

func New() *PNG

New initializes a new png chart image writer.

func (*PNG) Border

func (png *PNG) Border(x, y, w, h int)

Border draws a border around the chart area.

func (*PNG) End

func (png *PNG) End() error

End finishes and writes the image to the output writer.

func (*PNG) Graph

func (png *PNG) Graph() error

Graph renders all chart dataset values to the visible chart area.

func (*PNG) Legend

func (png *PNG) Legend(base float64)

Legend draws the image specific legend.

func (*PNG) Line

func (png *PNG) Line(color string, x1, y1, x2, y2 int)

Line draws a line between the points using the color name from the palette.

func (*PNG) Start

func (png *PNG) Start(wr io.Writer, w, h, mx, my int, start, end int64, p *palette.Palette, d data.Collection)

Start initializes a new image and sets the defaults.

func (*PNG) Text

func (png *PNG) Text(col, align string, role myimg.TextRole, x, y int, txt string)

Text writes a string to the image.

func (*PNG) TextID

func (png *PNG) TextID(id, col, align string, role myimg.TextRole, x, y int, txt string)

TextID writes a string to the image.

Jump to

Keyboard shortcuts

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