MAIDR JavaScript API
    Preparing search index...

    Function resolveSubplotLayout

    • Inspects the DOM to resolve the visual layout of all subplots in a figure.

      This is the only place where subplot-related DOM queries happen. The result is a plain data object that can be passed into the Figure model without violating MVVC layer boundaries.

      Every lookup is made inside roots, the chart's own element and the layers it draws outside it, so another chart's panels are neither counted nor measured. A layer selector that matches nothing there is looked up as Svg.queryAll does; the panel count is the chart's alone.

      Parameters

      • subplots: Subplot[][]

        The 2D subplot array from the Figure (already constructed).

      • roots: readonly QueryRoot[] = ...

        Where the chart is drawn; the whole page by default.

      Returns SubplotLayout

      A SubplotLayout containing pre-computed visual ordering, starting position, inversion flag, and axes element references.