MAIDR Documentation - v3.75.0
    Preparing search index...

    Interface VegaLiteChannelDef

    Subset of a Vega-Lite channel definition fields read by the adapter.

    Note on field: inside a repeat spec's child, Vega-Lite allows a repeat reference object ({ repeat: 'row' | 'column' | 'repeat' }) instead of a field name. The adapter substitutes those references with concrete field names (per repeated cell) before any conversion runs, so every code path past substituteRepeatFields only ever sees strings.

    interface VegaLiteChannelDef {
        field?: string;
        datum?: string | number | boolean;
        type?: string;
        aggregate?: string;
        title?: string;
        axis?: { title?: string } | null;
        bin?: boolean | Record<string, unknown>;
        stack?: string | boolean | null;
    }
    Index

    Properties

    field?: string
    datum?: string | number | boolean

    A constant bound to the channel instead of a data field ({"color": {"datum": "Adelie"}}).

    Vega-Lite's documented idiom for giving each child of a layer: spec its own legend entry; Altair emits it for color=alt.datum(name). Because the constant is the series' display name, the adapter uses it to label layers that a merge would otherwise leave anonymous.

    type?: string
    aggregate?: string
    title?: string
    axis?: { title?: string } | null
    bin?: boolean | Record<string, unknown>
    stack?: string | boolean | null