MAIDR JavaScript API
    Preparing search index...

    Interface MaidrUPlotOptions

    Options accepted by bindUPlot and maidrPlugin.

    interface MaidrUPlotOptions {
        id?: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        xLabel?: string;
        yLabel?: string;
        msPerUnit?: number;
        series?: Readonly<Record<number, UPlotSeriesMaidrOptions>>;
        live?: boolean;
        stacked?: boolean;
        areas?: boolean;
        highlightColor?: string;
        enabled?: boolean;
    }
    Index

    Properties

    id?: string

    Chart id used for DOM ids; generated when omitted.

    title?: string

    Chart title; defaults to uPlot's own title option.

    subtitle?: string
    caption?: string
    xLabel?: string

    X axis label; defaults to the x axis' label, then the x series' label.

    yLabel?: string

    Y axis label; defaults to each y scale's axis label.

    msPerUnit?: number

    Treat x values as timestamps in this many milliseconds per unit: 1000 for seconds (uPlot's default) or 1 for milliseconds (ms: 1 in the uPlot options). Only consulted when the x scale is a time scale; inferred from the size of the values when omitted.

    series?: Readonly<Record<number, UPlotSeriesMaidrOptions>>

    Per-series overrides, keyed by the series index in u.series.

    live?: boolean

    Keep MAIDR's reading in step with u.setData(...). On by default: an update replaces the data in place, and new points appended at the end are streamed so monitor mode (M) announces them. Set false for a chart whose data never changes.

    stacked?: boolean

    Read the chart as stacked: uPlot draws a stack from running totals, with a band (bands: [{ series: [upper, lower] }]) from each series down to the one beneath it, so taken at face value every series but the lowest reads as the total so far. With this set, each series joined to a lower one by a band is read as its own share (its value less the one beneath), and stacked bars become one stacked-bar layer with a total per category.

    Off by default, because a band is also how a range -- a min/max envelope, a confidence interval -- is filled, and there the upper series is a value in its own right.

    areas?: boolean

    Read line series drawn with a fill as area series. Off by default: area is an experimental MAIDR trace type, and a filled line navigates exactly as a line does.

    highlightColor?: string

    Color of the visual highlight drawn over the canvas. Defaults to the reader's highlight color from MAIDR's settings.

    enabled?: boolean

    Skip binding entirely (for a plugin registered on many charts).