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

    Interface MaidrLayer

    Layer/trace definition containing plot type, data, and rendering configuration.

    interface MaidrLayer {
        id: string;
        type: TraceType;
        title?: string;
        selectors?: string | string[] | CandlestickSelector | BoxSelector[];
        orientation?: Orientation;
        domMapping?: {
            order?: "row" | "column";
            groupDirection?: "forward" | "reverse";
            iqrDirection?: "forward" | "reverse";
        };
        axes?: { x?: string; y?: string; fill?: string };
        data:
            | HeatmapData
            | BarPoint[]
            | BoxPoint[]
            | CandlestickPoint[]
            | HistogramPoint[]
            | LinePoint[][]
            | ScatterPoint[]
            | SegmentedPoint[][];
    }
    Index

    Properties

    id: string
    type: TraceType
    title?: string
    selectors?: string | string[] | CandlestickSelector | BoxSelector[]
    orientation?: Orientation
    domMapping?: {
        order?: "row" | "column";
        groupDirection?: "forward" | "reverse";
        iqrDirection?: "forward" | "reverse";
    }

    Optional DOM mapping hints. When provided, individual traces can opt-in to use these hints to map DOM elements to the internal row-major data grid without changing default behavior when omitted.

    Type Declaration

    • Optionalorder?: "row" | "column"

      Specify DOM flattening order for grid-like traces. 'row' => row-major, 'column' => column-major.

    • OptionalgroupDirection?: "forward" | "reverse"

      For segmented/dodged bars, control the per-column group/level iteration. 'forward' => iterate groups top-to-bottom (as previously domOrder='forward'). 'reverse' => iterate bottom-to-top (default).

    • OptionaliqrDirection?: "forward" | "reverse"

      For boxplots, control the Q1/Q3 edge mapping for IQR box. 'forward' => Q1=bottom, Q3=top (default for vertical) 'reverse' => Q1=top, Q3=bottom (for Base R vertical boxplots)

    axes?: { x?: string; y?: string; fill?: string }
    data:
        | HeatmapData
        | BarPoint[]
        | BoxPoint[]
        | CandlestickPoint[]
        | HistogramPoint[]
        | LinePoint[][]
        | ScatterPoint[]
        | SegmentedPoint[][]