MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface D3BoxenConfig

    Configuration for binding a D3 boxen (letter-value) plot.

    Point selector at one element per distribution — the <g> holding the stack of nested rungs — the way D3BoxConfig points at a box group. Every rung of a distribution highlights that whole group, because a chart does not draw an element per quantile that MAIDR could pair up positionally.

    The ladder is read from the datum rather than measured off the rungs: a letter-value plot computes its quantiles before it draws them, and a height in pixels is a layout fact rather than a quantile.

    bindD3Boxen(svgElement, {
    selector: 'g.boxen',
    axes: { x: 'Group', y: 'Milliseconds' },
    x: 'group',
    median: 'median',
    levels: 'letterValues',
    });
    interface D3BoxenConfig {
        id?: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput };
        format?: AxisFormat;
        autoApply?: boolean;
        selector: string;
        x?: DataAccessor<string | number>;
        median?: DataAccessor<number>;
        levels?: DataAccessor<unknown[]>;
        lowerOutliers?: DataAccessor<number[]>;
        upperOutliers?: DataAccessor<number[]>;
        orientation?: Orientation;
    }

    Hierarchy (View Summary)

    Index

    Properties

    id?: string

    Unique identifier for the chart. Used as the MAIDR id.

    title?: string

    Chart title displayed in text descriptions.

    subtitle?: string

    Chart subtitle.

    caption?: string

    Chart caption.

    axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput }

    Axis configuration. Each axis may be provided as either a plain string (shorthand for { label: value }) or a full AxisConfig object (for per-axis format, or grid navigation on scatter).

    For heatmaps and segmented bar charts, use fill for the color/category axis; the binder maps it to the canonical z axis in the MAIDR schema.

    Type Declaration

    format?: AxisFormat

    Optional formatting configuration applied to axes that do not specify their own format. Per-axis format on AxisConfig takes precedence.

    autoApply?: boolean

    When true (the default), the binder writes the generated MAIDR schema to the SVG as a maidr-data attribute so vanilla-JS users don't need to call svg.setAttribute(...) themselves. The returned result is unchanged either way.

    Set to false if you are driving MAIDR yourself — e.g. passing the returned schema to <Maidr data={...}> or persisting it elsewhere. The React adapter (useD3Adapter, MaidrD3) forces this to false internally so it can stay in control of the schema.

    true
    
    selector: string

    CSS selector for the per-distribution elements (e.g. 'g.boxen').

    x?: DataAccessor<string | number>

    Accessor for the category the distribution summarises.

    'x', falling back to z, category, label, name, key, or group.

    median?: DataAccessor<number>

    Accessor for the middle of the distribution.

    'median', falling back to q2, mid, or y.

    levels?: DataAccessor<unknown[]>

    Accessor for the ladder of quantile pairs — one entry per rung, each carrying the tail probability p and the pair of quantiles lo / hi (lower / upper are accepted too).

    'levels', falling back to letterValues, letter_values, quantiles, or ladder. A rung whose three numbers are not all finite is dropped rather than announced as a quantile the data does not contain.

    lowerOutliers?: DataAccessor<number[]>

    Accessor for values below the deepest rung.

    'lowerOutliers'
    
    upperOutliers?: DataAccessor<number[]>

    Accessor for values above the deepest rung.

    'upperOutliers'
    
    orientation?: Orientation

    Chart orientation.

    Orientation.VERTICAL