chart

package module
v0.0.0-...-8fa619d Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 6 Imported by: 0

README

chart

creation of rendered images of charts

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BarChart

type BarChart struct {
	Title      string
	TitleStyle Style

	ColorPalette ColorPalette

	Width  int
	Height int
	DPI    float64

	BarWidth int

	Background core.Style
	Canvas     core.Style

	XAxis core.Style
	YAxis YAxis

	BarSpacing int

	UseBaseValue bool
	BaseValue    float64

	Font *truetype.Font

	Bars     []Value
	Elements []Renderable
	// contains filtered or unexported fields
}

BarChart is a chart that draws bars on a range.

func (BarChart) GetBarSpacing

func (bc BarChart) GetBarSpacing() int

GetBarSpacing returns the spacing between bars.

func (BarChart) GetBarWidth

func (bc BarChart) GetBarWidth() int

GetBarWidth returns the default bar width.

func (BarChart) GetColorPalette

func (bc BarChart) GetColorPalette() ColorPalette

GetColorPalette returns the color palette for the chart.

func (BarChart) GetDPI

func (bc BarChart) GetDPI() float64

GetDPI returns the dpi for the chart.

func (BarChart) GetFont

func (bc BarChart) GetFont() *truetype.Font

GetFont returns the text font.

func (BarChart) GetHeight

func (bc BarChart) GetHeight() int

GetHeight returns the chart height or the default value.

func (BarChart) GetWidth

func (bc BarChart) GetWidth() int

GetWidth returns the chart width or the default value.

func (BarChart) Render

func (bc BarChart) Render(rp RendererProvider, w io.Writer) error

Render renders the chart with the given renderer to the given io.Writer.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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