Versions in this module Expand all Collapse all v0 v0.10.0 Sep 11, 2026 v0.9.0 Sep 11, 2026 v0.8.1 Sep 9, 2026 v0.8.0 Sep 9, 2026 Changes in this version + var ErrColumnCount = fmt.Errorf("figure/data: wrong number of values") + var ErrNoKeyColumn = errors.New("figure/data: no such key column") + func AnyNull(mask []bool) bool + func Float64Column(src Source, name string) ([]float64, bool) + func FormatNumber(v float64) string + func GroupBy(src Source, col string) (keys []string, rows [][]int, ok bool) + func Int64Column(src Source, name string) ([]int64, bool) + func IsNull(mask []bool, i int) bool + func Label(src Source, col string, row int) (string, bool) + func Labels(src Source, col string) ([]string, bool) + func NullMask(src Source, name string) (null []bool, ok bool) + func Origins(src Source) []int + func StringColumn(src Source, name string) ([]string, bool) + func TimeColumn(src Source, name string) ([]time.Time, bool) + type Alignment struct + A []int + B []int + Keys []string + func Align(a, b Source, col string) (Alignment, error) + func (al Alignment) Entered() []string + func (al Alignment) Exited() []string + func (al Alignment) Len() int + func (al Alignment) Updated() []string + type Column struct + Floats []float64 + Ints []int64 + Kind Kind + Nulls []bool + Strings []string + Text func(i int) string + Times []time.Time + func ColumnOf(src Source, name string) (Column, bool) + func (c Column) Len() int + func (c Column) Numbers() ([]float64, bool) + func (c Column) Spell(i int) string + type Kind uint8 + const KindFloat64 + const KindInt64 + const KindString + const KindTime + type Source interface + Column func(name string) (Column, bool) + Columns func() []string + Len func() int + func Float64Columns(cols map[string][]float64) Source + func Rows(src Source, idx []int) Source + type Stream struct + func NewStream(cols ...string) *Stream + func (s *Stream) Append(vals ...float64) error + func (s *Stream) AppendTime(t time.Time, vals ...float64) error + func (s *Stream) Columns() []string + func (s *Stream) Len() int + func (s *Stream) Reset() + func (s *Stream) Snapshot() Source + func (s *Stream) Source() Source + func (s *Stream) Window(n int) *Stream + type Subset interface + SourceRows func() []int + type Table struct + func NewTable() *Table + func (t *Table) Column(name string) (Column, bool) + func (t *Table) Columns() []string + func (t *Table) Float64(name string, v []float64) *Table + func (t *Table) Int64(name string, v []int64) *Table + func (t *Table) Len() int + func (t *Table) String(name string, v []string) *Table + func (t *Table) Time(name string, v []time.Time) *Table + func (t *Table) WithNulls(name string, null []bool) *Table + func (t *Table) WithText(name string, text func(i int) string) *Table + type Tween struct + func NewTween(a, b Source, key string, opts ...TweenOption) (*Tween, error) + func (t *Tween) Alignment() Alignment + func (t *Tween) At(f float64) + func (t *Tween) Fraction() float64 + func (t *Tween) Rows() int + func (t *Tween) Source() Source + type TweenOption func(*tweenConfig) + func EnterFrom(col string, v float64) TweenOption + func ExitTo(col string, v float64) TweenOption + func Hold(cols ...string) TweenOption + func Round(col string, digits int) TweenOption