-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
LibreOffice renders chart data labels incorrectly — wrapping them across multiple lines where PowerPoint displays them on one line. For example, a label with Excel number format 0.0"x" renders as:
4.
0x
in LibreOffice, but correctly as 4.0x in PowerPoint. This affects all chart-cell data labels and makes pptx render --engine libreoffice unreliable for verifying chart output.
The root cause is that LibreOffice's chart renderer allocates insufficient horizontal space for data labels, especially when custom number formats include literal suffixes (e.g. "x", "m", "%").
Impact
pptx renderis our only automated way to visually verify output- Chart-cell development relies heavily on render → inspect → fix cycles
- LibreOffice wrapping makes it impossible to tell if labels are correct without opening in PowerPoint manually
Options
Option A: Fix LibreOffice rendering
Investigate whether LibreOffice chart label rendering can be improved via:
- Explicit label text box sizing in the chart XML (
c:spPrwith explicita:ext) a:bodyPr wrap="none"on label text properties (already partially set)- Pre-rendering labels as text overlays instead of native chart data labels
- LibreOffice-specific CLI flags or configuration
Option B: PowerPoint-native screenshot capture (macOS)
Use AppleScript / osascript to automate PowerPoint for Mac:
- Open the PPTX in PowerPoint
- Navigate to the target slide
- Take a screenshot of the slide area (via
screencaptureor PowerPoint's export-as-image) - Close or leave open
This would give pixel-perfect renders matching what the user sees. Requires PowerPoint for Mac to be installed.
Option C: Hybrid approach
- Use LibreOffice for non-chart slides (fast, reliable for text/tables)
- Fall back to PowerPoint screenshot for slides containing chart shapes
- Detect chart shapes automatically via the PPTX structure
Acceptance criteria
pptx renderproduces correct single-line data labels like4.0x,€330m- Works in the automated dev loop without manual intervention
- Ideally supports both
--engine libreofficeand--engine powerpoint