Skip to content

docs(xlsx): measure horizontal bar-chart category-label baselines, document blockers (#1621) - #1763

Merged
developer0hye merged 1 commit into
mainfrom
docs/issue-1621-bar-category-label-y-derivation
Sep 16, 2026
Merged

developer0hye merged 1 commit into
mainfrom
docs/issue-1621-bar-category-label-y-derivation

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • Confirms native Excel quantizes a horizontal bar chart's category-label vertical baseline to a whole sheet point: the issue's own 6 expense-chart baselines, divided by the sheet's 0.78 fit-to-height print scale, are exact integers. Extends this to a second chart (income, a different row pitch) and three font sizes (8/10/14pt) — 18 measured native baselines total, all whole sheet points.
  • Falsifies the obvious fix: neither a flat floor nor a flat round of office2pdf's own current continuous baseline reproduces native across both charts with one shared rule. floor matches every expense-chart row but only 1 of 5 income-chart rows; round matches every income-chart row but only 3 of 6 expense-chart rows.
  • Documents a more promising, still-incomplete decomposition (native = round(row's geometric centre) + a coarsely size-quantized term, mirroring line_category_baseline_pt's already-shipped ascent rounding) that fits the income chart exactly across all three sizes, but is off by one sheet point on 5 of 6 expense rows for a reason not yet isolated — most likely the plot rectangle's own vertical edges needing independent whole-point snapping before dividing into row bands. A category-count probe (not yet run — more invasive than the size probe here, since it needs to rewrite both the category and value caches together) would confirm or rule this out.
  • No runtime code changes — assets/validation/issue-1621/ only.

Related issue

Related: #1621, #1756

Testing

  • python3 assets/validation/issue-1621/verify_measurements.py exits 0, confirming the whole-sheet-point quantization and the floor/round split against both native datasets.
  • python3 scripts/probe_harness.py assets/validation/issue-1621/category-size-probe.json --backend office reproduces the 8pt/14pt income-chart native rows recorded in measurements.json.
  • Documentation-freshness review completed (two inaccurate claims found and fixed across two passes before this commit: a miscounted baseline total, and a false "farthest from the rounding boundary" superlative).
  • No .rs/runtime config changes — tests skipped per project convention for non-runtime changes.

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason: Adds only assets/validation/issue-1621/ measurement data, a probe spec, and a verification script; no chart rendering or codegen path is touched, so there is no rendered PDF change to audit.

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

…cument blockers (#1621)

Confirms native quantizes each row's vertical baseline to a whole sheet
point (the issue's own 6 expense-chart values, divided by the 0.78 fit
scale, are exact integers), and extends that to a second chart (income,
different row pitch) and three font sizes -- 18 measured baselines total,
all whole sheet points.

Falsifies the obvious fix: neither a flat floor nor a flat round of
office2pdf's own current continuous baseline reproduces native across both
charts with one shared rule. floor matches every expense row but only 1 of
5 income rows; round matches every income row but only 3 of 6 expense rows.

Documents a more promising but still incomplete decomposition (native =
round(row's geometric centre) + a coarsely size-quantized term, mirroring
line_category_baseline_pt's already-shipped ascent rounding) that fits the
income chart exactly across all three sizes, but is off by one sheet point
on 5 of 6 expense rows for a reason not yet isolated -- most likely the
plot rectangle's own vertical edges needing independent whole-point
snapping before dividing into row bands, which a category-count probe
(not yet run) would confirm or rule out.

No runtime code changes; assets/validation/issue-1621/ only.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit e5053f0 into main Sep 16, 2026
18 checks passed
@developer0hye
developer0hye deleted the docs/issue-1621-bar-category-label-y-derivation branch September 16, 2026 18:04
pull Bot pushed a commit to RadaKichenin/office2pdf that referenced this pull request Sep 16, 2026
…elines (developer0hye#1621)

Extends the developer0hye#1621 baseline-placement investigation with the category-count
probe the prior session (developer0hye#1763) flagged as the needed next step.

- Discovers and documents that a chart-XML-cache-only category-count patch
  is a complete no-op against native Excel: it re-derives the income
  chart's categories from xl/workbook.xml's defined-name array literal and
  its values from a live formula range, both outside the chart part, and
  overwrites the chart's own cache on open regardless of what it says.
- Adds build_category_count_probe.py, which patches both parts together to
  actually change category count in native Excel, and uses it to collect a
  new native measurement: the income chart widened to 6 categories.
- Refines the working model from "round + chart-specific K" to "floor +
  font-size-only K", which now reproduces 18 of 24 measured rows across
  three independent geometric configurations, narrowing the open question
  to a specific plot-rectangle edge-row effect.
- Falsifies one specific edge-row hypothesis (independent whole-point
  snapping of the plot rectangle's own edges).

No runtime code changes -- assets/validation/issue-1621/ only.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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