Documentation
¶
Index ¶
Constants ¶
View Source
const BOTTOM_LEFT = '└'
View Source
const BOTTOM_RIGHT = '┘'
View Source
const HDASH = '┈'
View Source
const HORIZONTAL_LINE = '─'
View Source
const ORIGIN = '└'
View Source
const TOP_LEFT = '┌'
View Source
const TOP_RIGHT = '┐'
View Source
const VDASH = '┊'
View Source
const VERTICAL_LINE = '│'
Variables ¶
View Source
var Body container
Functions ¶
Types ¶
type BarChart ¶
type BarChart struct {
Block
BarColor Attribute
TextColor Attribute
NumColor Attribute
Data []int
DataLabels []string
BarWidth int
BarGap int
// contains filtered or unexported fields
}
func NewBarChart ¶
func NewBarChart() *BarChart
type Block ¶
type Block struct {
X int
Y int
Border labeledBorder
IsDisplay bool
HasBorder bool
BgColor Attribute
Width int
Height int
PaddingTop int
PaddingBottom int
PaddingLeft int
PaddingRight int
// contains filtered or unexported fields
}
basic struct, consider it as css: display:block
type Bufferer ¶
type Bufferer interface {
Buffer() []Point
}
all renderable components should implement this
type ColumnBufferer ¶
type LineChart ¶
type LineChart struct {
Block
Data []float64
DataLabels []string
Mode string // braille | dot
DotStyle rune
LineColor Attribute
AxesColor Attribute
// contains filtered or unexported fields
}
func NewLineChart ¶
func NewLineChart() *LineChart
type List ¶
type Sparkline ¶
type Sparkline struct {
Data []int
Height int
Title string
TitleColor Attribute
LineColor Attribute
// contains filtered or unexported fields
}
func NewSparkline ¶
func NewSparkline() Sparkline
return unrenderable single sparkline, need to add it into Sparklines
type Sparklines ¶
func NewSparklines ¶
func NewSparklines(ss ...Sparkline) *Sparklines
func (*Sparklines) Add ¶
func (s *Sparklines) Add(sl Sparkline)
func (*Sparklines) Buffer ¶
func (sl *Sparklines) Buffer() []Point
Source Files
¶
Click to show internal directories.
Click to hide internal directories.