MAIDR JavaScript API
    Preparing search index...

    Configuration accepted by both the MaidrMuiCharts wrapper component and the useMuiChartsAdapter hook.

    interface MuiChartsAdapterConfig {
        id: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        children: ReactNode;
        chartType?: MuiChartKind;
        percentileBands?: PercentileBandOption[];
    }
    Index

    Properties

    id: string

    Unique identifier for the chart. Used for DOM element IDs.

    title?: string

    Chart title displayed in text descriptions.

    subtitle?: string

    Chart subtitle.

    caption?: string

    Chart caption.

    children: ReactNode

    The MUI X chart to make accessible: one chart element of a kind listed under MuiChartKind, optionally wrapped in plain elements such as a <Box>. Its own props -- series, xAxis, yAxis, dataset, layout, a sparkline's data, a gauge's value -- are what the adapter reads.

    chartType?: MuiChartKind

    Which kind of chart children is.

    Only needed when the kind cannot be recognised on its own. The adapter reads it from the component's name first and, failing that, from the class names MUI stamps on the rendered SVG, so a minifier that renames the component still leaves the second route open.

    percentileBands?: PercentileBandOption[]

    A <LineChart>'s fan charts, each read as one percentile_band layer.

    MUI X has no range series, but a stacked area series is filled between its own top and the top of the series below it -- so a band is a hidden base series holding its lower edge and an area series stacked on it holding its width. Nothing says which quantiles those edges are, so they are stated here: median names the median's series and each band's series the area series on top of its stack, both by series id (or label), with the band's two levels as fractions.

    // series: [
    // { id: 'p90-base', data: p5, stack: 'p90', showMark: false },
    // { id: 'p90', data: p95.map((v, i) => v - p5[i]), stack: 'p90', area: true },
    // { id: 'median', data: p50 },
    // ]
    percentileBands: [{
    median: 'median',
    bands: [{ series: 'p90', lower: 0.05, upper: 0.95 }],
    }]