Function: componentsReady()
ts
function componentsReady(chart): Promise<void>;Resolves once chart has drawn its first frame, every follow-up pass its components requested has run, and all text (tick labels, titles, legend) is typeset.
Contract gap (reported for the runtime): chart.ready resolves before async text is typeset; once the runtime awaits component readiness itself, this becomes chart.ready.
Parameters
| Parameter | Type |
|---|---|
chart | Chart |
Returns
Promise<void>
Example
ts
const chart = createChart(el, figure);
await componentsReady(chart); // safe to screenshot / export