bargraph

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package bargraph provides a simple plotting widget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(w IBarGraph, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func RenderSize

func RenderSize(w gowid.IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

Types

type IBarGraph

type IBarGraph interface {
	GetData() [][]int
	GetAttrs() []gowid.IColor
	GetMax() int
}

type IWidget

type IWidget interface {
	gowid.IWidget
	IBarGraph
}

type Widget

type Widget struct {
	Data  [][]int
	Max   int
	Attrs []gowid.IColor
	gowid.RejectUserInput
	gowid.NotSelectable
}

func New

func New(atts []gowid.IColor) *Widget

func (*Widget) GetAttrs

func (w *Widget) GetAttrs() []gowid.IColor

func (*Widget) GetData

func (w *Widget) GetData() [][]int

func (*Widget) GetMax

func (w *Widget) GetMax() int

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func (*Widget) SetData

func (w *Widget) SetData(l [][]int, max int, app gowid.IApp)

func (*Widget) String

func (w *Widget) String() string

Jump to

Keyboard shortcuts

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