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:
constresult = awaitvegaEmbed('#vis', vlSpec, { renderer:'svg' }); awaitresult.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.
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 mustawait view.runAsync()between embedding and binding:For most use cases prefer embed, which performs both steps for you.