chartutils

package
v0.0.62 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLabelFormatter

func DefaultLabelFormatter(label string, availableWidth int) string

DefaultLabelFormatter es el formateador de etiquetas por defecto (no hace nada)

func FormatNumberValueFormatter

func FormatNumberValueFormatter(v any) string

FormatNumberValueFormatter formatea los valores numéricos con separadores de miles

Types

type LabelFormatter

type LabelFormatter func(label string, availableWidth int) string

LabelFormatter es un tipo para las funciones que formatean etiquetas Recibe la etiqueta original y el ancho disponible para ella.

func TruncateNameLabelFormatter

func TruncateNameLabelFormatter(maxCharsPerWord int) LabelFormatter

TruncateNameLabelFormatter crea un formateador que trunca las etiquetas usando TruncateName maxCharsPerWord: máximo de caracteres por palabra El ancho máximo se pasará como segundo argumento a la función devuelta.

type ValueFormatter

type ValueFormatter func(v interface{}) string

ValueFormatter es un tipo para las funciones que formatean valores

Jump to

Keyboard shortcuts

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