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

    Type Alias D3FacetsConfig

    D3FacetsConfig: D3PanelChartSpec & {
        panelSelector: string;
        panelTitle?: DataAccessor<string>;
        layout?: D3PanelLayout;
    }

    Configuration for bindD3Facets — homogeneous small multiples (one chart type repeated across panels inside a single SVG).

    The chartType / config pair selects the per-panel binder; the inner config also carries the figure-level fields (id, title, subtitle, caption, autoApply). Each matched panel element becomes the extraction root for the per-type binder, so config.selector is resolved within each panel.

    Type Declaration

    • panelSelector: string

      CSS selector for the panel container elements inside the SVG — the canonical D3 facet idiom is one translated <g> per panel (e.g. 'g.panel'). Each match becomes one MAIDR subplot.

    • OptionalpanelTitle?: DataAccessor<string>

      Accessor for each panel's display title, resolved against the panel element's D3-bound __data__ (for d3.groups output, the [key, values] tuple — pass d => d[0] or rely on the automatic key detection). Function accessors receive (datum, index) and are invoked even when the panel has no bound datum (datum is then undefined), so index-only accessors like (_d, i) => keys[i] work for panels appended without a data join; string-key accessors and the automatic key detection require a bound datum. Falls back to Panel <n> when unresolvable.

    • Optionallayout?: D3PanelLayout

      Explicit grid layout. When omitted, inferred from panel geometry.