MAIDR JavaScript API
    Preparing search index...
    interface PlotlyTrace {
        type?: string;
        mode?: string;
        name?: string;
        uid?: string;
        visible?: boolean | "legendonly";
        line?: { shape?: string };
        fill?: string;
        stackgroup?: string;
        groupnorm?: string;
        x?: (string | number)[];
        y?: (string | number)[];
        z?: (string | number)[] | (number | null)[][];
        xaxis?: string;
        yaxis?: string;
        orientation?: "h" | "v";
        base?: number | (string | number)[];
        text?: string | (string | number)[];
        hovertext?: string | (string | number)[];
        textfont?: { size?: number | number[] };
        customdata?: unknown[];
        meta?: unknown;
        width?: number | number[];
        measure?: string[];
        error_x?: PlotlyErrorBar;
        error_y?: PlotlyErrorBar;
        q1?: number[];
        median?: number[];
        q3?: number[];
        lowerfence?: number[];
        upperfence?: number[];
        mean?: number[];
        side?: "positive" | "negative" | "both";
        box?: { visible?: boolean };
        meanline?: { visible?: boolean };
        open?: number[];
        high?: number[];
        low?: number[];
        close?: number[];
        xbins?: { start?: number; end?: number; size?: number };
        ybins?: { start?: number; end?: number; size?: number };
        histfunc?: "min" | "max" | "count" | "sum" | "avg";
        labels?: (string | number)[];
        values?: (string | number)[];
        parents?: (string | number)[];
        ids?: (string | number)[];
        maxdepth?: number;
        level?: string | number;
        node?: { label?: (string | number)[]; groups?: number[][] };
        link?: { source?: number[]; target?: number[]; value?: number[] };
        value?: number;
        title?: string | { text?: string };
        gauge?: PlotlyGauge;
        delta?: { reference?: number };
        subplot?: string;
        r?: (string | number)[];
        theta?: (string | number)[];
        geo?: string;
        locations?: (string | number)[];
        dimensions?: PlotlyDimension[];
        sort?: boolean;
        domain?: { x?: [number, number]; y?: [number, number] };
        colorbar?: { title?: string | { text?: string } };
        contours?: PlotlyContours;
    }
    Index

    Properties

    type?: string
    mode?: string
    name?: string
    uid?: string
    visible?: boolean | "legendonly"
    line?: { shape?: string }

    Line styling. shape is how plotly joins consecutive samples: linear and spline interpolate, while hv, vh, hvh and vhv draw a piecewise-constant staircase.

    fill?: string

    What the trace fills towards: tozeroy, tonexty, toself, … Plotly resolves an unfilled trace to the string 'none' rather than dropping the attribute, so a filled trace is any other non-empty value.

    stackgroup?: string

    The stack this trace belongs to. Plotly stacks scatter traces that name the same group, drawing them as an area chart whose bands sit on one another; an empty or absent value means the trace stands alone.

    groupnorm?: string

    How a stack group is rescaled: percent makes each column sum to 100, fraction to 1. Empty or absent leaves the bands at their own totals.

    x?: (string | number)[]
    y?: (string | number)[]
    z?: (string | number)[] | (number | null)[][]

    A heatmap's grid of magnitudes — and a choropleth's flat column of them, which is the same attribute carrying one value per region rather than one per cell.

    A grid cell may be null: that is how plotly's own documentation writes a hole in a field, and the readers here treat any non-number as one.

    xaxis?: string
    yaxis?: string
    orientation?: "h" | "v"
    base?: number | (string | number)[]

    Value-axis offset every bar-like size is measured from. An ARRAY floats each bar from its own offset, which is how a schedule is drawn: the bar starts at base[i] and runs for the duration in x[i].

    text?: string | (string | number)[]

    Text drawn at, or associated with, each point. A word cloud is a scatter whose terms live here, and a choropleth names its regions here when the locations themselves are codes.

    hovertext?: string | (string | number)[]

    Hover-only text. Plotly.py's hover_name resolves to this.

    textfont?: { size?: number | number[] }

    Glyph styling for the text marks. An ARRAY of sizes is what makes a text scatter a word cloud: the size is per term rather than per trace.

    customdata?: unknown[]

    Author-supplied values carried through to hover templates and events.

    meta?: unknown

    Plotly's own arbitrary-metadata attribute, and the slot a co-located maidr declaration rides in — trace.meta.maidr. Typed unknown because it is very often a plain string that has nothing to do with MAIDR; readDeclarationSlot narrows it.

    width?: number | number[]

    How wide each bar is drawn, in position-axis units. Ordinary bar styling — which is exactly why a non-uniform array is NOT read as a marimekko on its own. It becomes data only once a trace declares type: 'mosaic'.

    measure?: string[]

    What each step does to the running total: relative contributes, total restates it, absolute resets it. Parallel to the position array, and relative where it says nothing.

    error_x?: PlotlyErrorBar
    error_y?: PlotlyErrorBar
    q1?: number[]
    median?: number[]
    q3?: number[]
    lowerfence?: number[]
    upperfence?: number[]
    mean?: number[]
    side?: "positive" | "negative" | "both"

    Which half of each violin is drawn. positive is plotly's own ridgeline recipe: the curves are halved so they can overlap without hiding one another.

    box?: { visible?: boolean }

    Inner box overlay. Plotly draws path.box only when visible is true.

    meanline?: { visible?: boolean }

    Mean line overlay drawn across the violin.

    open?: number[]
    high?: number[]
    low?: number[]
    close?: number[]
    xbins?: { start?: number; end?: number; size?: number }
    ybins?: { start?: number; end?: number; size?: number }

    Bin bounds for a histogram binned up the y axis. Plotly puts the samples on y and the counts on x for orientation: 'h', and the bin size moves to ybins with them.

    histfunc?: "min" | "max" | "count" | "sum" | "avg"

    How a histogram reduces the samples that fall in a bin. Plotly's default is 'count', which is why a 2D histogram's cells are counts unless the trace says otherwise.

    labels?: (string | number)[]

    Slice labels, in the order the trace was authored.

    values?: (string | number)[]

    Slice magnitudes, parallel to labels.

    parents?: (string | number)[]

    Each sector's parent, parallel to labels. An empty string means the sector sits at the root. Plotly matches these against ids when a trace has them and against labels otherwise.

    ids?: (string | number)[]

    Sector ids, for a hierarchy whose labels repeat. Parallel to labels.

    maxdepth?: number

    How many levels below the entry point are drawn; -1 for all of them.

    level?: string | number

    The sector the layout is entered at, drawing that subtree alone.

    node?: { label?: (string | number)[]; groups?: number[][] }

    The nodes the flows run between.

    link?: { source?: number[]; target?: number[]; value?: number[] }

    The flows themselves, held as three parallel arrays. source and target are INDICES into node's labels rather than the names a MAIDR flow carries.

    value?: number

    The measure a gauge draws.

    title?: string | { text?: string }

    What the measure is called. Only the indicator traces carry one.

    gauge?: PlotlyGauge

    The dial. Present only when mode includes gauge.

    delta?: { reference?: number }

    The comparison an indicator draws its delta against.

    subplot?: string

    Which polar subplot the trace is drawn on (polar, polar2, …). Polar traces carry this instead of an xaxis/yaxis pair.

    r?: (string | number)[]

    Radial coordinates — the magnitude on each spoke.

    theta?: (string | number)[]

    Angular coordinates — which spoke each value sits on.

    geo?: string

    Which geo subplot the trace is drawn on (geo, geo2, …). A choropleth carries this instead of an xaxis/yaxis pair.

    locations?: (string | number)[]

    The regions shaded, named the way locationmode addresses them — an ISO code, a state name, a GeoJSON feature id. Parallel to the values in z.

    dimensions?: PlotlyDimension[]

    One entry per axis, each carrying the whole column of observations. Plotly stores the transpose of the row-per-observation grid MAIDR reads.

    sort?: boolean

    Whether plotly reorders the slices largest-first before drawing them. Defaults to true, so the authored order is NOT the drawn order unless a trace turns this off.

    domain?: { x?: [number, number]; y?: [number, number] }

    Fraction of the paper the trace occupies, [start, end] in [0, 1] on each side. A pie is positioned by this rather than by axes, so it is the only thing that says where one sits relative to its siblings.

    colorbar?: { title?: string | { text?: string } }
    contours?: PlotlyContours

    The iso-value curves the trace draws.