feat(pptx): render bar/column charts as axis-scaled plots#323
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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_axis: 1/2/5/10 steps, 5 ticks) with gridlines and tick labelschart_value_labeldrops float noise (8.2000001→8.2); no in-plot value labels, matching PowerPoint/ExcelOther chart types (pie/line/area/scatter) keep the existing fallback.
Test plan
chart_value_label/nice_axisunit tests; updated the bar visual test for the new markup (rects, gridlines, series-name title)--checkclean; clippy-D warningscleanVisual verification (public bar-chart fixture vs PowerPoint GT, 110 DPI)
Title, bold "Sales" area title, gridlines with 0–10 ticks, axis-scaled bars, and the "Sales" legend all match GT; the raw
8.2float is gone.Related: #217
🤖 Generated with Claude Code