Skip to content

fix: validate ODF chart geometry and pie arcs - #1088

Merged
andiwand merged 2 commits into
mainfrom
review/70-odf-chart-geometry
Oct 5, 2026
Merged

andiwand merged 2 commits into
mainfrom
review/70-odf-chart-geometry

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

ODF charts validate plot geometry and axis intervals before converting them to integers, clamp label spacing to the category count, and fall back when coordinates cannot be represented. Numeric values use the existing locale-independent parser. Pie totals are normalized before summing, and each slice uses two arcs so a single nonzero slice draws a complete circle or ring.

The existing single-slice regression now checks the arc count; two additional cases cover invalid/extreme geometry and overflowing pie totals. All 73 targeted checks pass, including 55 ODS corpus cases. The changed production file passes clang-tidy.

@andiwand
andiwand force-pushed the review/69-odf-chart-data branch from edef8ab to 32c91f7 Compare October 5, 2026 18:48
Base automatically changed from review/69-odf-chart-data to main October 5, 2026 18:51
andiwand and others added 2 commits October 5, 2026 20:51
The PR padded a constant series by 10% on both sides, which moves the
axis of every chart with one repeated value. Keep the old padding of 1,
and grow it only where the value is so large that 1 is lost. The label
stride no longer uses std::clamp, which is undefined for no categories.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
@andiwand
andiwand force-pushed the review/70-odf-chart-geometry branch from 0842929 to 3d65efe Compare October 5, 2026 18:57
@andiwand
andiwand merged commit 0afe544 into main Oct 5, 2026
24 of 25 checks passed
@andiwand
andiwand deleted the review/70-odf-chart-geometry branch October 5, 2026 19:06
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