asciigraph

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: 6 Imported by: 1

Documentation

Overview

Package asciigraph provides a simple plotting widget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

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

func RenderSize

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

TODO: ILineWidget?

Types

type IAsciiGraph

type IAsciiGraph interface {
	GetData() []float64
	GetConf() []asciigraph.Option
}

type IWidget

type IWidget interface {
	gowid.IWidget
	IAsciiGraph
}

type Widget

type Widget struct {
	Data []float64
	Conf []asciigraph.Option
	gowid.RejectUserInput
	gowid.NotSelectable
}

func New

func New(series []float64, config []asciigraph.Option) *Widget

func (*Widget) GetConf

func (w *Widget) GetConf() []asciigraph.Option

func (*Widget) GetData

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

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) SetConf

func (w *Widget) SetConf(conf []asciigraph.Option, app gowid.IApp)

func (*Widget) SetData

func (w *Widget) SetData(data []float64, 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