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

    Function bindVegaLite

    • Initialise MAIDR on an already-rendered Vega-Lite chart.

      Locates the <svg> inside the Vega view's container, converts the spec to a Maidr schema, and mounts the accessible MAIDR UI on it.

      The view must have completed its first render before this is called. vegaEmbed(...) resolves when the view is constructed, not when it has rendered*, so callers using this entry point directly must await view.runAsync() between embedding and binding:

      const result = await vegaEmbed('#vis', vlSpec, { renderer: 'svg' });
      await result.view.runAsync(); // wait for the first paint
      maidrVegaLite.bindVegaLite(result.view, vlSpec, { id: 'my-chart' });

      For most use cases prefer embed, which performs both steps for you.

      Parameters

      Returns void