Skip to content

feat(pptx): render bar/column charts as axis-scaled plots#323

Merged
developer0hye merged 1 commit into
mainfrom
fix/pptx-chart-layout
Jul 18, 2026
Merged

feat(pptx): render bar/column charts as axis-scaled plots#323
developer0hye merged 1 commit into
mainfrom
fix/pptx-chart-layout

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

The chart fallback stretched bars into a thin bordered frame, exposed raw floating-point value labels (8.20000000000001), detached the title, and drew no axis, gridlines, or legend.

Render bar (horizontal) and column (vertical) charts as an axis-scaled plot:

  • Nice-rounded value axis (nice_axis: 1/2/5/10 steps, 5 ticks) with gridlines and tick labels
  • Category labels; bars scaled to the axis, drawn bottom-up for bar charts
  • Right-side legend; chart/series title on top; Office accent series colors
  • chart_value_label drops float noise (8.20000018.2); no in-plot value labels, matching PowerPoint/Excel

Other chart types (pie/line/area/scatter) keep the existing fallback.

Test plan

  • New tests: axis ticks present + no raw floats; chart_value_label/nice_axis unit tests; updated the bar visual test for the new markup (rects, gridlines, series-name title)
  • Full workspace suite passes; fmt --check clean; clippy -D warnings clean

Visual verification (public bar-chart fixture vs PowerPoint GT, 110 DPI)

PowerPoint GT Before After
gt before after

Title, bold "Sales" area title, gridlines with 0–10 ticks, axis-scaled bars, and the "Sales" legend all match GT; the raw 8.2 float is gone.

Related: #217

🤖 Generated with Claude Code

The chart fallback stretched bars into a thin bordered frame, exposed
raw floating-point value labels, detached the title, and drew no axis
or legend. Render bar (horizontal) and column (vertical) charts as an
axis-scaled plot instead: a nice-rounded value axis with gridlines and
tick labels, category labels, bottom-up bars, a right-side legend, the
chart/series title on top, and Office's accent series colors — with
value labels formatted to drop float noise (8.2000001 → 8.2) and no
in-plot labels, matching PowerPoint/Excel.

Related: #217

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit 0af9791 into main Jul 18, 2026
14 checks passed
@developer0hye
developer0hye deleted the fix/pptx-chart-layout branch July 18, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant