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

    Function queryD3Elements

    • Queries all matching elements within a container and returns them with their D3-bound data.

      Elements created by the MAIDR core (hidden highlight clones, stamped with data-maidr-owned) are excluded, so rebinding while a chart is focused — when those clones are present in the live DOM — still sees only the user's real marks with contiguous indexes.

      Parameters

      • container: Element

        The root element (typically an SVG) to query within.

      • selector: string

        CSS selector for the target elements.

      Returns { element: Element; datum: unknown; index: number }[]

      Array of { element, datum, index } tuples.

      Error if the selector is empty.