tgraph

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 5 Imported by: 1

README

Tgraph

GoDoc Build Go Report Card

Tgraph is a Go package for drawing basic graphics in a terminal. It was inspired by termgraph.

Graph types supported:

  • Bar Graphs
  • Multi-variable
  • Stacked charts
  • Emoji

Examples

see _examples

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chart

func Chart(title string, labels []string, data [][]float64, categories []string, colors []string, width float64, stacked bool, tick string)

Chart Handle the normalization of data and the printing of the graph.

func Normalize

func Normalize(data [][]float64, width float64) [][]float64

Normalize the data and return it.

Types

type ByLength added in v0.0.2

type ByLength []string

ByLength In order to sort by the length of the string

func (ByLength) Len added in v0.0.2

func (s ByLength) Len() int

func (ByLength) Less added in v0.0.2

func (s ByLength) Less(i, j int) bool

func (ByLength) Swap added in v0.0.2

func (s ByLength) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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