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

    Interface RechartsSubplotConfig

    Per-panel configuration for multi-panel (faceted) charts.

    Each panel is one Recharts chart in a grid of small multiples. Panel fields mirror the corresponding RechartsAdapterConfig fields; any field left out falls back to the top-level config value, so shared settings (data, xKey, axis labels, ...) only need to be declared once.

    Every panel must define its own chartType + yKeys (simple mode) or layers (composed mode) — these are the only fields without a top-level default, because subplots is mutually exclusive with the top-level chartType/layers.

    interface RechartsSubplotConfig {
        title?: string;
        data?: Record<string, unknown>[];
        chartType?: RechartsChartType;
        xKey?: string;
        yKeys?: string[];
        layers?: RechartsLayerConfig[];
        xLabel?: string;
        yLabel?: string;
        orientation?: Orientation;
        fillKeys?: string[];
        binConfig?: HistogramBinConfig;
        selectorOverride?: string;
        panelSelector?: string;
    }
    Index

    Properties

    title?: string

    Panel display name (e.g. the facet value, "Region: East"). Announced when navigating between subplots.

    data?: Record<string, unknown>[]

    Panel data array. Falls back to the top-level data.

    chartType?: RechartsChartType

    Chart type for this panel (simple mode). Mutually exclusive with layers.

    xKey?: string

    Key in data objects for x-axis values. Falls back to the top-level xKey.

    yKeys?: string[]

    Keys in data objects for y-axis values (simple mode). Falls back to the top-level yKeys.

    Layer configurations for a composed panel (composed mode).

    xLabel?: string

    X-axis label. Falls back to the top-level xLabel.

    yLabel?: string

    Y-axis label. Falls back to the top-level yLabel.

    orientation?: Orientation

    Bar chart orientation. Falls back to the top-level orientation.

    fillKeys?: string[]

    Series display names. Falls back to the top-level fillKeys.

    binConfig?: HistogramBinConfig

    Histogram bin range configuration. Falls back to the top-level binConfig.

    selectorOverride?: string

    Custom CSS selector override for this panel's highlight elements. Unlike other fields, this does NOT fall back to the top-level selectorOverride (a single override cannot distinguish panels). Provide an already panel-scoped selector when using this.

    panelSelector?: string

    Custom CSS selector for this panel's container element — the escape hatch when you render the panel DOM yourself (e.g. via the useRechartsAdapter hook) instead of letting <MaidrRecharts> generate .maidr-panel-<row>-<col> wrapper divs.

    Used both to scope this panel's highlight selectors and as the subplot container selector, so it must match ONLY this panel.