Skip to content

fix(xlsx): lay chart content out on the frame's fitted sheet origin - #1747

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1607-chart-vertical-inset
Sep 15, 2026
Merged

developer0hye merged 1 commit into
mainfrom
fix/issue-1607-chart-vertical-inset

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

File submission policy

Before attaching or committing files, read the submission policy.

  • Any submitted sample files or attachments satisfy the submission policy, or none are submitted. The source is the public Gift Budget and Tracker1.xlsx misc issues #982 attachment already tracked in the repository; only derived evidence is added.

Summary

An anchored worksheet chart's content (plot, gridlines, value and category labels, legend, markers) was laid out from the converter's physical page origin while its frame was painted on Excel's fitted sheet-space origin (#1542). At the gift workbook's 0.82 fit scale the two origins differ by 0.854 sheet points, and the #1250 chrome model had absorbed that gap: a 10.146pt top inset and an 11.853pt bottom pad reproduced the native plot only there. On the unscaled control, where the origins coincide, the whole plot printed 0.854pt high and its whole-point gridlines re-rounded one point off native.

Native Excel for Mac 16.112 exports of the same chart at 100% and at 0.82 (the fresh exports recorded for #1598 and #1600), and the 0.78 export measured for #1272, all put the plot 11 sheet points inside the frame at the top and keep an 11pt bottom edge pad, the flat inset Excel already uses on the right. The chart content now shares the frame's origin, the two vertical insets are that 11pt, the bottom-legend seat is re-based by the same 0.853pt, and the sheet_paint_offset_pt plumbing that kept the content on the old origin (write_offset_paint_box_start, WorksheetMarkerPlacement::plot_offset) is removed. The unscaled control's gridlines, value labels, category labels and legend now trace at the native page coordinates; the fitted chart keeps its matched vertical geometry and its x moves 0.185pt onto the native plot edge.

Related: #1607

Related issue

Related: #1607. Filed from this audit: #1745 (series not clipped to the whole-point plot rectangle) and #1746 (unscaled centred tile keeps a fractional horizontal origin). The January and June column edges are recorded on #1735.

Testing

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason: Moves every anchored worksheet chart's content onto the frame's fitted sheet origin and corrects the vertical plot insets.

Visual audit

Visual comparison

GT Before After
GT Before After

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Used Codex/Claude vision to inspect the full GT/output pages, diff, and matched crops
  • Inspected matched region crops at full resolution
  • Ran compare_layout.py --audit --fine-shift PT and dispositioned every fine/large text-instance shift, rectangle geometry deviation, painted-text visibility mismatch, and visible-fill occlusion
  • Ran compare_render.py --cluster-report PATH --strict-clusters and dispositioned every material 5% fuzz diff cluster by explicit ID
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT: three pages in source order.
Element presence Matches GT: eleven gridlines, axis, five columns, series line, markers, legend and labels on both tiles.
Position/size Remaining: #1746 (tile origin, 0.225..0.28pt), #1735 (column left edges), #1738 (budgeted); the plot top/bottom, gridlines, value and category labels and legend rows are fixed onto the native rows.
Rotation/flip Matches GT.
Fill Matches GT: column, band and legend-key fills keep colour and coverage.
Stroke/border Remaining: #1745 (zero-value series runs painted over the axis). The eleven 0.74pt gridlines and the 2.24pt series stroke otherwise match in width, colour and dash style (solid).
Shape outline geometry Remaining: #1735 (January, June and July column left edges one sheet point right). Native raster marker sprites against vector discs at the same centres are accepted shape-edge antialiasing.
Text content Remaining: #1736 (clipped chart runs stay in the neighbouring tile's text layer). Visible text matches on both tiles.
Font family/weight/style Matches GT: Segoe UI chart text, bold occasion cells, regular body text on every crop.
Text color Matches GT.
Alignment Remaining: #1738 (second line of the wrapped centred budgeted header). Value labels right-aligned and category labels centred as native.
Line/paragraph spacing Matches GT: gridline pitch 24/25pt on whole sheet points and the 20pt category-to-legend row pitch.
Clipping/overflow Remaining: #1745 (series not clipped to the whole-point plot rectangle). The chart ends at the printed sheet edge on page 2 and continues on page 3 as native does.

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining converter or harness deviations each reference an open issue

🤖 Generated with Claude Code

An anchored worksheet chart's plot, gridlines, labels and legend were laid
out from the converter's physical page origin while its frame was painted
on Excel's fitted sheet-space origin (#1542). At the gift workbook's 0.82
fit scale the two origins differ by 0.854 sheet points, and the #1250
chrome model had absorbed that gap: a 10.146pt top inset and an 11.853pt
bottom pad reproduced the native plot only there. On the unscaled control,
where the origins coincide, the whole plot printed 0.854pt high and its
whole-point gridlines re-rounded one point off native.

Native Excel for Mac 16.112 exports of the same chart at 100% and at 0.82,
and the 0.78 export of #1272, all put the plot 11 sheet points inside the
frame at the top and keep an 11pt bottom edge pad, the flat inset Excel
already uses on the right. The chart content now shares the frame's
origin, the two vertical insets are that 11pt, the bottom-legend seat is
re-based by the same 0.853pt, and the paint-offset plumbing that kept the
content on the old origin is gone. The unscaled control's gridlines,
value labels, category labels and legend now trace at the native page
coordinates; the fitted chart keeps its matched vertical geometry and its
x moves 0.185pt onto the native plot edge.

Related: #1607

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit ae3f0e9 into main Sep 15, 2026
18 checks passed
@developer0hye
developer0hye deleted the fix/issue-1607-chart-vertical-inset branch September 15, 2026 12:29
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