components

package
Version: v0.0.0-...-12052a3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartLayout

type ChartLayout string
const (
	PageNoneLayout   ChartLayout = "none"
	PageCenterLayout ChartLayout = "center"
	PageFlexLayout   ChartLayout = "flex"
)

type Charter

type Charter interface {
	Type() string
	GetAssets() opts.Assets
	Validate()
}

Charter

type Layout

type Layout struct {
	TemplateColumns template.CSS
	TopHeight       template.CSS
	BottomHeight    template.CSS
	TopContent      template.HTML
	BottomContent   template.HTML
	LeftContent     template.HTML
	RightContent    template.HTML
}

type Page

type Page struct {
	render.Renderer
	opts.Initialization
	opts.Assets

	PageBackgroundColor string
	Layout              Layout
	Charts              []interface{}
	ChartArea           ChartLayout
}

Page represents a page chart.

func NewPage

func NewPage(assetsHost string) *Page

NewPage creates a new page.

func (*Page) AddCharts

func (page *Page) AddCharts(charts ...Charter) *Page

AddCharts adds new charts to the page.

func (*Page) SetBackgroundColor

func (page *Page) SetBackgroundColor(color string) *Page

func (*Page) SetLayout

func (page *Page) SetLayout(layout Layout) *Page

func (*Page) Validate

func (page *Page) Validate()

Validate

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