docs(xlsx): confirm line-legend marker floor rule, document blockers (#1618) - #1754
Merged
developer0hye merged 1 commit intoSep 16, 2026
Merged
Conversation
…blocks shipping it (#1618) Native Excel seats a line-legend key's marker on a whole chart point via floor(target) - (size mod 2)/2, the same algebra WorksheetMarkerPlacement already uses for plot markers. Verified against 9 legend sizes across two independent native export batches (4 gathered fresh for this issue), on both axes, with the floor-vs-round discriminating rows named explicitly. A general fix is blocked: x is algebraically reachable but boundary- sensitive under the Segoe UI substitute this machine renders; y depends on office2pdf's own sample-line position, which drifts up to 2.87pt from native past the font size this issue was filed at (a separate root cause, filed as #1753) and, even once that's fixed, needs Rust to own an absolute position Typst's inline layout currently resolves on its own. Landing a fix that only holds at the one calibrated size would be exactly the overfit this project's TDD rule forbids. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
developer0hye
deleted the
docs/issue-1618-legend-marker-offset-derivation
branch
September 16, 2026 14:29
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
centre = floor(target) - (marker_size mod 2)/2, the same algebraWorksheetMarkerPlacementalready applies to plot markers — against 9 legend sizes across two independent native Excel export batches (4 gathered fresh for this PR, specifically to get the sample line's own x-extent, which the earlier XLSX: small-font legends retain oversized line-series markers #1617 batch did not record), on both axes, including the rows that discriminate floor from round.xaxis is algebraically reachable but boundary-sensitive under the Segoe UI substitute this machine renders (floor margins as small as 0.053pt); theyaxis is blocked by two separate issues — office2pdf's own sample-line position already drifts up to 2.87pt from native past 9pt (a distinct root cause, filed separately as XLSX: line-legend sample line doesn't scale with legend font size past the marker cap #1753, since this project's convention is one issue per root cause), and even once that's fixed, Rust doesn't currently have the sample line's resolved absolute position to floor (it comes out of Typst's own inline box/baseline layout).assets/validation/issue-1618/only, plus a new issue (XLSX: line-legend sample line doesn't scale with legend font size past the marker cap #1753) for the unrelated root cause discovered during this investigation.Related issue
Related: #1618, #1617, #1753
Testing
python3 assets/validation/issue-1618/verify_floor_phase_rule.pyexits 0, confirming the floor rule against all 32 rows of both native datasets.python3 assets/validation/issue-1618/measure_legend_line_x.py 0.82 <pdf>...reproduces the x0/x1/mid values committed innative-legend-line-key-measurements.json..rs/runtime config changes — tests skipped per project convention for non-runtime changes.Visual impact
assets/validation/issue-1618/measurement scripts and native-export data used to derive and verify the placement rule; no chart rendering or codegen path is touched, so there is no rendered PDF change to audit.Checklist
Signed-off-byline🤖 Generated with Claude Code