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

    Function buildNoElementsError

    • Builds a richer "no elements matched" error that distinguishes between three common failure modes so users can fix them quickly:

      1. Nothing at all was drawn (no SVG children) — likely the binder ran before D3 rendered.
      2. Something was drawn but nothing matches the given selector — likely a typo, wrong class, or wrong element name.
      3. The selector matches elements but none carry a __data__ binding — the DOM was drawn by hand (or by a non-D3 library), so the binder has no data to extract.

      Parameters

      • container: Element

        The root element the selector was run against.

      • selector: string

        The CSS selector the user provided.

      • elementKind: string

        Human-friendly name for the target elements (e.g. "bar", "box group", "cell") used in the suggestion text.

      Returns Error