Spec for the next big arc: replacing the current chart-placeholder
behaviour (single image layer at PPTX_IMAGE_PLACEHOLDER_URL) with
native rendering — bars / wedges / lines as Artstr shape layers,
labels as text layers. Branch pptx-chart-spec.
Scope decisions baked in:
- Phase 1: clustered column + bar charts only. Bars as rect shape
layers, category labels as text. Plot area derived via a fixed
inset on the chart's graphicFrame bounding box (no
c:manualLayout reading until Phase 4).
- Phase 2: pie / doughnut. Slice geometry emitted as kind:'path'
with SVG arc d-attributes.
- Phase 3: line charts with optional markers.
- Phase 4: title / legend / data labels / value-axis ticks /
gridlines.
- Phase 5: stacked + percent-stacked variants.
- Deferred to placeholder: scatter, bubble, area, radar, 3D,
combo charts, trendlines, error bars, per-point overrides.
Architecture:
- New src/pptx-importer-charts.js with the per-type builders,
loaded as an addendum to pptx-importer.js (or inlined — TBD
during implementation; the dependency budget is small enough
that a single file might be cleaner).
- convertGraphicFrame in pptx-importer.js gets a "try native
before placeholder" branch: parse chart XML, dispatch on type,
fall through to the existing placeholder + warning when the
builder returns null.
- All chart data read from c:strCache / c:numCache. The embedded
ppt/embeddings/*.xlsx workbook is ignored — caches are reliable
in OOXML output and reading XLSX is its own rabbit hole.
Acceptance criteria for Phase 1: gallery_template_layout_set.pptx
slide 10 imports with 8 native bar layers (#5E735D + #B05A44
clustered across Q1-Q4) plus 4 category-label text layers,
matching what PowerPoint shows. Scatter / 3D / etc. still
placeholder cleanly without crash.