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

    Interface D3ManhattanConfig

    Configuration for binding a D3 Manhattan plot.

    Extends D3ScatterConfig because the marks are the same: one element per point, with x the genomic position and y the transformed p-value. What it adds is the part of the chart a sighted reader takes from the labels and the colours — which SNP a point is, which chromosome it sits on, and where the significance line was drawn.

    bindD3Manhattan(svgElement, {
    selector: 'circle.snp',
    axes: { x: 'Position', y: '-log10(p)', fill: 'Chromosome' },
    x: 'pos',
    y: 'logP',
    label: 'snp',
    group: 'chromosome',
    significance: 7.3,
    });
    interface D3ManhattanConfig {
        id?: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput };
        format?: AxisFormat;
        autoApply?: boolean;
        selector: string;
        x?: DataAccessor<number>;
        y?: DataAccessor<number>;
        label?: DataAccessor<string>;
        group?: DataAccessor<string>;
        significance?: number;
        significanceDirection?: "above" | "below";
    }

    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 point elements (e.g., 'circle', 'circle.dot').

    x?: DataAccessor<number>

    Accessor for the x-axis value.

    'x'
    
    y?: DataAccessor<number>

    Accessor for the y-axis value.

    'y'
    
    label?: DataAccessor<string>

    Accessor for what each point is — a SNP id, a probe, a marker.

    'label', falling back to snp, id, name, gene, or probe. Left out of the payload when the datum carries none of them.

    group?: DataAccessor<string>

    Accessor for the region a point belongs to — its chromosome.

    'group', falling back to chromosome, chrom, chr, or region. Left out of the payload when the datum carries none of them.

    significance?: number

    The significance cutoff on the y axis, on the axis the chart is drawn against — 7.3 for genome-wide significance on a -log10(p) axis.

    There is deliberately no default: the conventions differ by field and by software, and a guessed line would sort every point onto the wrong side silently. Omit it and the trace simply reports no findings.

    significanceDirection?: "above" | "below"

    Which side of significance is the significant one. 'above' (the default) suits the transformed axes these charts usually carry; a raw p axis runs the other way and needs 'below'.