chart

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChartHeight = 15
	ChartWidth  = 60
)

Variables

This section is empty.

Functions

func RenderBarChart

func RenderBarChart(data ChartData, style lipgloss.Style, accentColor, textColor lipgloss.Color) string

RenderBarChart creates a beautiful ASCII bar chart

func RenderLineChart

func RenderLineChart(data ChartData, style lipgloss.Style, accentColor, textColor lipgloss.Color) string

RenderLineChart creates an ASCII line chart

func RenderPieChart

func RenderPieChart(data ChartData, style lipgloss.Style, colors []lipgloss.Color, textColor lipgloss.Color) string

RenderPieChart creates an ASCII pie chart

func RenderSparkline

func RenderSparkline(data ChartData, accentColor lipgloss.Color) string

RenderSparkline creates a compact sparkline

Types

type ChartData

type ChartData struct {
	Labels []string
	Values []float64
	Title  string
}

func ExtractChartData

func ExtractChartData(sheet models.Sheet, startRow, startCol, endRow, endCol int) ChartData

ExtractChartData extracts numeric data from selected cells

type ChartType

type ChartType int
const (
	ChartBar ChartType = iota
	ChartLine
	ChartSparkline
	ChartPie
)

Jump to

Keyboard shortcuts

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