Skip to main content
A dashboard can render its shell before its charts are ready. Add a readiness marker to the page once the chart has been drawn, then ask Doczilla to wait for that marker.

Capture before and after the chart is ready

Install the Doczilla Node SDK with npm install @doczilla/node. Set DOCZILLA_API_KEY in your environment and run node capture-dashboard.mjs alongside dashboard.html. This runs two renders so you can compare the results.
capture-dashboard.mjs

HTML

Save the HTML below as dashboard.html. A timer simulates a data request. The chart is inserted before the page sets data-chart-ready.
dashboard.html

Output

Weekly orders dashboard displaying Loading chart

Without a readiness check

Weekly orders dashboard with seven bars and a total of 457

After the chart reports that it is ready

If readiness depends on application state instead of a CSS selector, use a boolean expression with page.waitForFunction. Doczilla can continue rendering after either wait times out, so a successful HTTP response can still contain a loading state. See Page options.