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

    Interface Maidr

    interface Maidr {
        id: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        subplots: MaidrSubplot[][];
        live?: boolean;
        maxWidth?: number;
        onNavigate?: NavigateCallback;
    }
    Index

    Properties

    id: string

    Unique identifier for the chart. Used for DOM element IDs.

    title?: string

    Chart title displayed in text descriptions.

    subtitle?: string

    Chart subtitle.

    caption?: string

    Chart caption.

    subplots: MaidrSubplot[][]

    2D grid of subplots. Each row is an array of subplots. For a single chart, use [[{ layers: [...] }]].

    live?: boolean

    Enables live/realtime mode for this chart. When true:

    • React consumers can update the data prop to replace the chart data in place.
    • Script-tag consumers can push updates via window.maidrLive.setData() / window.maidrLive.appendData().
    • The 'M' key toggles monitor mode, which auto-sonifies and announces newly appended data points.

    Static charts (the default) are unaffected.

    maxWidth?: number

    Sliding window size for streaming data. When set, appending a data point beyond this width drops the oldest point(s), keeping at most maxWidth points per series. Only applies to appendData updates.

    onNavigate?: NavigateCallback

    Optional callback invoked when the active data point changes. Used by canvas-based charting libraries (e.g., Chart.js) for visual highlighting, since canvas elements cannot be targeted with CSS selectors.

    This field is not serializable as JSON; it is only available when constructing MAIDR data programmatically (e.g., via the Chart.js plugin or React API).