feat: chart cells, header sub field, responsive chart column sizing #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds chart cell support — embed native PowerPoint bar charts directly in table cells via YAML references. Also introduces the
subfield for semantic header subtitles and fixes column sizing for chart-heavy tables.Chart Cells
Table cells can now reference chart data points using
chartname-Nsyntax:Each chart reference renders as a native
<c:chartSpace>shape sized to the cell. Supports:"{:.1f}x","€{}m") converted to Excel number formatsCLEAN_SLIDES_CHARTS_PATHenv var orcharts.pyin the project)Header
subFieldNew optional
subfield on all header types for units, qualifiers, and annotations:The
subtext renders as a soft line break (<a:br/>) within the same paragraph — non-bold, body text color, no extra paragraph spacing. Plain strings still work unchanged.Column Sizing Fix
Chart-only columns no longer claim an equal share of the area as their max width. They use their header text width instead, expanding proportionally with remaining slack. This prevents text-only columns from being squeezed when many chart columns are present.
Changes
clean_slides/spec.py—ChartDef,ChartRefdataclasses;subfield onColSuperHeaderandTableSpecheaders; rich content parsing for headersclean_slides/chart_render.py— new module: chart shape generation, label positioning, scale groupsclean_slides/charts.py— chart module loaderclean_slides/content.py—header_text_and_sub()helper;_make_sub_paragraph();subonParagraphclean_slides/renderer.py— chart cell rendering;use_line_breaks=Truefor header cellsclean_slides/sizing.py— chart row/column equalization;sub-aware height/width calculations; responsive chart column sizingclean_slides/verification.py— pass raw header values (not stringified) to overflow checks