MAIDR Documentation - v3.73.0
    Preparing search index...
    • Bind a group of AnyChart charts to MAIDR as ONE multi-panel figure.

      This is the multi-panel counterpart of bindAnyChart. It accepts the same chart-grid input as anyChartsToMaidr, then:

      1. builds the combined Maidr object (one subplot per chart),
      2. stamps data-maidr-anychart-panel="<token>" on each chart's own <svg> and token-prefixed highlight attributes on its marks, so every selector resolves ONLY inside its own panel,
      3. wraps the panels' common ancestor in a transparent host <div>, sets the combined maidr-data attribute on it, and dispatches a single maidr:bindchart event once every panel's SVG has rendered.

      Requirements: every chart must be drawn into its OWN container element (the standard AnyChart idiom), and all panel containers should live under a common wrapper element — the host wraps that wrapper (or groups same-parent siblings) so MAIDR mounts once for the whole figure. Shared-Stage dashboards (multiple charts on one Stage/container) are not supported.

      Calling this again for the same group is safe: the existing binding is reused and the current Maidr object is returned.

      Parameters

      Returns Maidr | null

      The generated Maidr object, or null on failure.

      const q1 = anychart.column([['A', 4], ['B', 2]]);
      q1.title('Q1'); q1.container('panel-1').draw();
      const q2 = anychart.column([['A', 6], ['B', 3]]);
      q2.title('Q2'); q2.container('panel-2').draw();

      bindAnyCharts([[q1, q2]], { id: 'sales', title: 'Sales by Quarter' });