blessed-components - v1.20.0
    Preparing search index...

    Interface SparklineData

    Stateful data accepted by the Blessed sparkline adapter.

    interface SparklineData {
        capabilities?: Pick<TerminalCapabilities, "colorLevel">;
        backgroundTone?: keyof ThemeColors;
        borderTone?: keyof ThemeColors;
        theme?: Theme;
        tone?: keyof ThemeColors;
        characters?: readonly string[];
        emptyText?: string;
        label?: string;
        max?: number;
        min?: number;
        summary?: string;
        value?: string | number;
        values: readonly number[];
        width: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    capabilities?: Pick<TerminalCapabilities, "colorLevel">

    Explicit color capability used for deterministic rendering.

    backgroundTone?: keyof ThemeColors

    Semantic background token.

    'background'

    borderTone?: keyof ThemeColors

    Semantic border token.

    'border'

    theme?: Theme

    Semantic terminal theme.

    tone?: keyof ThemeColors

    Semantic foreground token.

    'foreground'

    characters?: readonly string[]

    Ordered glyph scale from lowest to highest intensity.

    At least two non-empty strings are required. Glyphs should occupy one terminal cell to keep output width predictable.

    ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']

    emptyText?: string

    Text returned when values is empty.

    Metadata is not rendered for an empty series.

    'No data'

    label?: string

    Optional heading label rendered above the graph.

    max?: number

    Explicit upper domain bound.

    When omitted, the largest input value is used. If either explicit bound is supplied, the resolved max must be greater than the resolved min.

    min?: number

    Explicit lower domain bound.

    When omitted, the smallest input value is used.

    summary?: string

    Optional text appended to the graph line after one space.

    value?: string | number

    Optional primary value rendered next to label.

    This value is presentation metadata and does not affect graph scaling.

    values: readonly number[]

    Ordered finite numeric samples.

    The input array is never mutated.

    width: number

    Positive integer maximum number of graph cells.

    Longer series are downsampled. Shorter series are not padded.