MAIDR JavaScript API
    Preparing search index...

    Minimal Vega-Lite top-level specification shape.

    Covers single-view, layered (layer), composite (hconcat / vconcat / concat), faceted (facet operator or encoding.row / encoding.column shorthand), and repeated (repeat) specs.

    interface VegaLiteSpec {
        usermeta?: { maidr?: MaidrTraceDeclaration };
        $schema?: string;
        title?:
            | string
            | string[]
            | { text?: string
            | string[]; subtitle?: string | string[] };
        description?: string;
        data?: unknown;
        transform?: VegaLiteTransform[];
        mark?:
            | string
            | {
                type: string;
                interpolate?: string;
                innerRadius?: number;
                extent?: string;
                center?: string;
            };
        encoding?: VegaLiteEncoding;
        name?: string;
        layer?: VegaLiteSpec[];
        resolve?: {
            scale?: Partial<Record<string, "shared" | "independent">>;
            axis?: Partial<Record<string, "shared" | "independent">>;
        };
        hconcat?: VegaLiteSpec[];
        vconcat?: VegaLiteSpec[];
        concat?: VegaLiteSpec[];
        facet?: VegaLiteFacetDef;
        spec?: VegaLiteSpec;
        repeat?: VegaLiteRepeatDef;
        columns?: number;
    }
    Index

    Properties

    usermeta?: { maidr?: MaidrTraceDeclaration }

    Vega-Lite's own sanctioned slot for third-party metadata, and the only home a JSON-authored or Altair-produced spec has for one.

    usermeta.maidr carries a MaidrTraceDeclaration — what the chart means, where the drawing does not say. It belongs on the spec node that becomes one MAIDR layer: a single-view spec, a layer[i] child, a concat or facet leaf. A block on a composite parent names no one layer and is ignored with a warning.

    $schema?: string
    title?:
        | string
        | string[]
        | { text?: string
        | string[]; subtitle?: string | string[] }

    The chart's title. An array is a title of several lines, drawn one under the other.

    description?: string
    data?: unknown
    transform?: VegaLiteTransform[]
    mark?:
        | string
        | {
            type: string;
            interpolate?: string;
            innerRadius?: number;
            extent?: string;
            center?: string;
        }

    The mark, as a shorthand string or a mark def. interpolate is how Vega-Lite joins consecutive points: the step, step-before and step-after values draw a piecewise-constant staircase, the rest interpolate. innerRadius is what turns an arc pie into a doughnut — purely visual, so the two convert identically. extent is how far a composite mark's interval reaches — stderr, ci, stdev, iqr — which the adapter reads only when it has to aggregate the raw observations itself, or to tell an interquartile band from the rest. center is the statistic a composite mark's interval is centred on, mean or median.

    encoding?: VegaLiteEncoding
    name?: string

    Vega-Lite's name for a view, "for later reference". It also names the view's compiled marks -- p5_95_marks rather than layer_0_marks for a layer named p5-95, through varName -- and it is what a fan chart's percentile_band declaration names its bands by.

    layer?: VegaLiteSpec[]
    resolve?: {
        scale?: Partial<Record<string, "shared" | "independent">>;
        axis?: Partial<Record<string, "shared" | "independent">>;
    }

    Whether a composite spec's children share a channel's scale or axis. A channel left out is shared, as Vega-Lite shares it.

    hconcat?: VegaLiteSpec[]
    vconcat?: VegaLiteSpec[]
    concat?: VegaLiteSpec[]
    columns?: number

    Wrap column count for concat, wrapped facet (single-field form), and wrapped repeat (array form). Vega-Lite's default when omitted is an unbounded number of columns (a single row).