MAIDR Documentation - v3.72.1
    Preparing search index...
    • Returns the CSS selector string for individual data point elements of the given Recharts chart type.

      Returns undefined when seriesIndex is provided, because CSS alone cannot reliably target a specific series in Recharts' SVG structure. See the module-level documentation for details.

      The generated selectors are bare page-global class selectors (e.g. .recharts-bar-rectangle .recharts-rectangle). MAIDR resolves them via page-global document.querySelectorAll, so with two or more Recharts charts on one page they would cross-match. Pass chartId (the <Maidr> config id) to scope every selector to that chart's own #maidr-article-<id> wrapper so the charts cannot highlight one another's elements.

      For multi-panel figures every panel lives inside the SAME article wrapper, so chartId alone is not enough: pass panelScope (a selector matching only that panel's container, e.g. .maidr-panel-0-1) to keep each panel's selectors from matching sibling panels' marks.

      Parameters

      • chartType: RechartsChartType

        The Recharts chart type

      • OptionalseriesIndex: number

        When set, indicates a multi-series chart — returns undefined

      • OptionalchartId: string

        When set, scopes the selector to the chart's <Maidr> article (#maidr-article-<id>) to avoid cross-chart matches

      • OptionalpanelScope: string

        When set, additionally scopes the selector to one panel's container within the article (subplot mode)

      Returns string | undefined

      CSS selector string, or undefined for multi-series targeting