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

    Interface RenderSparklineOptions

    Options accepted by renderSparkline.

    Samples are kept in input order, scaled into characters, and reduced to at most width cells. Values outside an explicit domain are clamped.

    interface RenderSparklineOptions {
        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

    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.