# Chart.js to PDF: render charts in HTML-to-PDF
Chart.js to PDF without blank canvases. Disable animation, use wait_for_expression, get sharp output, plus tips for ECharts and ApexCharts.
**Quick answer.** In Chart.js, set `animation: false` and set `window.chartsReady = true` once the charts have drawn. Then send the HTML with `wait_for_expression` so the renderer waits for that flag before printing.
```bash
curl -X POST https://html-pdf.com/v1/pdf \
-H "Authorization: Bearer $HTML_PDF_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html report.html \
'{html: $html, format: "A4", margin: "15mm",
wait_for_expression: "window.chartsReady === true"}')" \
-o report.pdf
```
Charts are the most common reason an HTML-to-PDF render comes out wrong. The PDF shows an empty box, a half-drawn bar chart, or a blurry image.
The cause is almost always timing. Chart.js draws on a `