Alerts & Reports PDF – Prevent Chart Truncation in Multi-Row Dashboards
- Dominant language
- Python
- Stars
- 74.8k
- Forks
- 18.3k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 685
Description
### Bug description
When exporting dashboards via Alerts & Reports to PDF, charts with multiple rows (3+) are frequently truncated at the bottom due to viewport and rendering limitations. Current behavior requires manual adjustments to viewport size, screenshot settings, or tiled screenshot configurations to capture full charts.
**Reference Tickets / PRs:**
[#34561 – Tiled screenshots in Playwright reports](https://github.com/apache/superset/pull/34561)
– Addresses blank or incomplete screenshots for large dashboards.
[#29326 – Playwright dashboard screenshot blank issue](https://github.com/apache/superset/issues/29326)
– Highlights Chromium rendering delays causing missing chart sections.
**Request / Technical Requirements:**
- Ensure complete chart capture in PDF exports, regardless of row count or dashboard height.
- Automatically utilize tiled screenshots for dashboards exceeding viewport limits (height > 5000px or charts > 20) without manual intervention.
- Maintain consistent layout, scaling, and readability across all charts in exported PDFs.
- Support both Chrome and Firefox headless WebDrivers, ensuring proper Selenium / Playwright integration in Dockerized Superset environments.
- Reduce dependency on manual overrides such as SCREENSHOT_VIEWPORT_HEIGHT or ALERT_REPORTS_MAX_CUSTOM_SCREENSHOT_WIDTH for multi-row dashboards.
**Impact / Benefits:**
- Eliminates truncated charts in PDF exports.
- Removes need for manual screenshot or configuration tweaks.
- Improves reliability and completeness of Alerts & Reports.
- Ensures consistent rendering across headless browsers and Docker deployments.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Contributor guide
Research direction
Start by reading PR #34561 and issue #29326, then trace the Alerts & Reports PDF screenshot path they discuss. Verify exports with multi-row and oversized dashboards in the supported headless browsers, and consider the work done when charts are complete without manual viewport or screenshot overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, playwright, python
- Domain
- backend, data-visualization, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100