Skip to content

fix(charts): preserve declared series marker styling - #1579

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1185-marker-style
Sep 5, 2026
Merged

fix(charts): preserve declared series marker styling#1579
developer0hye merged 1 commit into
mainfrom
fix/issue-1185-marker-style

Conversation

@developer0hye

@developer0hye developer0hye commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve a chart series marker's declared size, fill, opacity, and outline separately from the plotted series. The budget workbook's selected-period marker previously became a small orange circle because only its symbol was parsed. It now renders as the declared 14pt teal circle with a 0.75pt outline. Plot markers and legend keys share the styling across line, area, combo, and radar charts; absent settings retain existing defaults.

Related: #1185. Remaining independent marker placement and paint-order defects are tracked in #1577 and #1578.

Testing

  • Captured failing real-workbook size and parser paint-isolation regressions before implementation. All 36 focused marker tests pass, including size boundaries, invalid values, suppressed paint, multiple chart families, and legend keys.
  • Initial candidate full workspace: 3,478 tests passed; workspace clippy with -D warnings, formatting, and diff checks passed. After integrating the baseline portability follow-up, all 2,846 library tests, workspace clippy, and a locked CLI build pass. The rebuilt PDF has a complete two-page trace identical to the reviewed marker candidate, excluding the PDF filename.
  • Native Excel one-factor controls cover marker sizes 2, 8, 14, and 28pt, red and suppressed fills, and a 2pt outline. No-patch exports are layout-identical. Native's raster canvas includes padding; comparisons use the declared point size and visible ink rather than treating the canvas as the vector diameter.
  • Page 1 is unchanged at 150 DPI; page 2 changes 1,887 pixels inside a 49x49-pixel marker region at 300 DPI. One fill operation becomes the styled fill plus outline; all other 920 fill/stroke operations remain unchanged.
  • Normalized native/before/after text matches on both pages (486 and 2,120 non-whitespace characters). All 55 page-1 and 480 page-2 material clusters have explicit dispositions.

Baseline: 7ffaefeb78e5d45d6be0330ee3554b4b3f8ac8d8, including the separate category-baseline correction. The recorded before PDF was built at 9ba2c7150a992e66df7790ceeebe3f2ede0976d2; its complete two-page trace is identical to the follow-up baseline. Fixture SHA-256: 2b4a2d8dceda58758593c88409875efbda05780559154c02bd13fef4f7a1c65b; Cargo.lock SHA-256: 750f50c507b281f84b945b09573333ffa02dc45cddd566481af8535ae101e612.

Reference: Open XML SDK's marker child model separates symbol, size, and shape properties; c:size is an integer from 2 through 72 points.

Reproduce with cargo run --locked -p office2pdf-cli -- tests/fixtures/xlsx/issue_1181_fit_to_height.xlsx -o output.pdf --font-path '/Applications/Microsoft Excel.app/Contents/Resources/DFonts'. Run compare_layout.py GT.pdf output.pdf --audit --fine-shift 0.5 --json and compare_render.py GT.pdf output.pdf --page P --dpi DPI --fine-shift 0.5 --cluster-report PATH --cluster-dispositions PATH --strict-clusters for both pages (150 and 300 DPI respectively).

Visual impact

  • Rendered PDF change or visual evidence added

Visual audit

Visual comparison

Native Excel 16.112.3 exports, verified Excel/Quartz PDF provenance. Page 2 at 300 DPI:

GT Before After
GT Before After

The unchanged page-1 native comparison is attached to #1550, #1551, and #1552.

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: two printable sheets retain their native order.
Element presence Remaining: #1566 omitted worksheet separator lines. Fixed: declared marker size, fill, and outline.
Position/size Remaining: #1272 chart frame, #1542 fitted drawings, #1545 fixed-row text, #1550 title-row height, #1552 footer position. Remaining: #1577 stale cached marker value. Marker styling follows its declared size.
Rotation/flip No deviation observed: no transform changes.
Fill Remaining: #1578 axis overpainting opaque marker fill. Fixed: the marker uses its own declared teal fill.
Stroke/border Remaining: #1578 axis overpainting; #1566 omitted worksheet separator lines; #1564 fitted worksheet rule thickness/placement. Fixed: declared marker outline width and paint. Declared chart-line opacity remains 25% and 50%, matching native. Gray table hairlines, teal total rules, and brown category rules retain their paths; no dashed or dotted source rules are lost.
Shape outline geometry Remaining: #1272 chart frame and #1550 title-band height. Fixed: marker circle uses the declared 14pt size. Other path operations retain geometry and paint.
Text content Matches GT after whitespace normalization of pdftotext -layout; all label/value characters are preserved; the source month categories also retain their significant trailing space.
Font family/weight/style Matches GT: the existing Cambria major-theme category font is preserved. Bold Cambria section headings, bold Trebuchet expense headings, Arial bold instruction title, and Aptos footer retain their emphasis. No italic or underlined runs are changed.
Text color Matches GT: chart labels and worksheet text retain their colors.
Alignment Remaining: #1542 drawing labels, #1545 row text, #1550 first-page content, #1552 footer baselines. Remaining: #1577 stale cached marker value.
Line/paragraph spacing Remaining: #1545 fixed-row seating and #1551 wrapped note line pitch.
Clipping/overflow No deviation observed: no new clipping or overflow; native and output both display ##### in the narrow annual-total cells.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye changed the base branch from fix/issue-1568-category-baseline to main September 5, 2026 10:05
@developer0hye
developer0hye merged commit 3a1d6cd into main Sep 5, 2026
34 of 35 checks passed
@developer0hye
developer0hye deleted the fix/issue-1185-marker-style branch September 6, 2026 00:13
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