ticker

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ticker

type Ticker struct {
	MaxValues int
	// contains filtered or unexported fields
}

A Ticker keeps track of a series of values and creates a simple, text-based graphical representation.

func (Ticker) Add

func (t Ticker) Add(values ...float64) Ticker

Add appends new values to the ticker. If the new number of values exceeds the ticker's MaxValues, older values are discarded.

func (Ticker) Count

func (t Ticker) Count() int

Count returns the number of values currently in the ticker.

func (Ticker) Height

func (t Ticker) Height(height int) Ticker

Height sets the height of the ticker. If not set, a single row is used.

func (Ticker) View

func (t Ticker) View() string

View returns a string representation of the ticker's current state.

func (Ticker) Width

func (t Ticker) Width(width int) Ticker

Width sets the width of the ticker. If not set, the ticker's MaxValues is used.

Jump to

Keyboard shortcuts

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