Documentation ¶
Overview ¶
Package chartbar 控制台绘制ascii柱状图
Index ¶
- Variables
- type Ctx
- func (ctx *Ctx) WithAnySlice(a interface{}, iterateTransFn func(originItem interface{}) Item, ...) string
- func (ctx *Ctx) WithCsv(filename string) (string, error)
- func (ctx *Ctx) WithItems(items []Item) string
- func (ctx *Ctx) WithMap(m map[string]int) string
- func (ctx *Ctx) WithMapFloat(m map[string]float64) string
- type Item
- type ModOption
- type Option
- type Order
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCtx = NewCtx()
Functions ¶
This section is empty.
Types ¶
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) WithAnySlice ¶
type Option ¶
type Option struct { MaxBarLength int // 柱状图形的最大长度 DrawIconBlock string // 柱状图实体绘制内容 DrawIconPadding string // 柱状图空余部分绘制内容 HideName bool // 是否隐藏图形旁边的Name字段 HideNum bool // 是否隐藏图形旁边的Num字段 Order Order // 排序方式 PrefixNumLimit int // 只显示前`PrefixNumLimit`个元素,注意,可以和`SuffixNumLimit`同时使用 SuffixNumLimit int // 只显示后`SuffixNumLimit`个元素 }
Click to show internal directories.
Click to hide internal directories.