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

    Interface D3ParallelConfig

    Configuration for binding a D3 parallel coordinates plot.

    The chart draws one <path> (or <polyline>) per observation across several per-variable scales, and the datum bound to it is that observation as a whole — { mpg: 21, hp: 110, weight: 2600 }. The layer's rows are the observations and its columns are the axes, so the binder transposes: for each observation it emits one point per entry of dimensions, whose x is the axis' name and whose y is that observation's value on it.

    dimensions is required, and is the same list the chart already built one scale per: the order is the order the axes are drawn in, which is the order a reader arrows through them. Nothing on the datum says it — an object's key order is not an axis order — and a guessed one would announce the chart's columns in the wrong places.

    interface D3ParallelConfig {
        id?: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput };
        format?: AxisFormat;
        autoApply?: boolean;
        selector: string;
        dimensions: string[];
        value?: (datum: unknown, dimension: string, index: number) => number;
        label?: DataAccessor<string>;
    }

    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 observation paths (e.g. 'path.observation', 'polyline.line'). Each matched element is one observation.

    dimensions: string[]

    The axes, in the order they are drawn. Each is a key on the observation.

    value?: (datum: unknown, dimension: string, index: number) => number

    Reads one dimension off an observation. Defaults to a plain property lookup — supply this when the values are nested (d.values[dimension]) or need converting.

    label?: DataAccessor<string>

    Accessor for the observation's name, announced as its series name.

    'name', falling back to label, id, key, group or fill.