Skip to content

Charts: hidden axis labels and unfilled gridlines are read from the chart XML (refs #1366) - #1469

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Harrison-Booth:dc-chart-axes-xml
Oct 30, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
Harrison-Booth:dc-chart-axes-xml

Conversation

@Harrison-Booth

@Harrison-Booth Harrison-Booth commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 of #1366 (items 1 and 2): two axis settings in the chart XML that the reader ignored.

  • c:tickLblPos val="none" on the value axis now hides its labels, like c:delete (it sets y_hidden, whose renderer path already drops labels and keeps gridlines).
  • A c:majorGridlines / c:minorGridlines whose c:spPr/a:ln holds a:noFill is no longer read as present, so it is not drawn.

Checked against real PowerPoint: I made a temporary presentation through COM, added a clustered column chart, set the value-axis major gridline line to No line and its labels to None, and saved it. The saved c:valAx has c:tickLblPos val="none" and c:majorGridlines/c:spPr/a:ln/a:noFill (plus an a14:hiddenLine extension), which is the shape the reader now handles. The category axis saved with c:delete val="1" while keeping its c:majorGridlines; DeckCraft reads no category-axis gridlines, so that is untouched.

Not done here: the other #1366 items (manual layout, title, data labels, pie), and a deleted category axis.

Tests: new unit test hidden_labels_and_unfilled_gridlines_are_read in crates/pptx/src/read/chart.rs. I did not build or run it locally; only cargo fmt --check ran. The fork's CI runs the suite. No other open PR touches chart axis reading.

Summary by CodeRabbit

  • Bug Fixes
    • Chart value-axis labels are now hidden when configured as “none.”
    • Major and minor gridlines are no longer displayed when explicitly set to no fill.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 55e5ee5 and 5896859.

Files selected for processing: 1
  • crates/pptx/src/read/chart.rs

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The chart reader now treats value-axis labels as hidden when tickLblPos="none". It excludes major and minor gridlines with spPr/ln/noFill. A test covers visible and hidden labels and filled and unfilled gridlines.

Changes: Chart axis state

Layer / File(s) Summary
Axis visibility and gridline detection
crates/pptx/src/read/chart.rs
The reader treats tickLblPos="none" as hidden and excludes gridlines with noFill. A test checks the resulting axis and gridline flags.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related issues

  • Issue 1366 reports that tickLblPos="none" does not hide axis labels and that gridlines with noFill are still drawn. This PR changes both corresponding checks in the chart XML reader.

Suggested reviewers: echelon, nikitkara

Merge Risk: Minimal · up to 58968

No actionable merge-blocking risk remains; the change is ready for normal CI validation.

Architecture risk: Low · up to 58968

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/pptx/src/read/chart.rs: Axis label visibility now also treats tickLblPos="none" as deleted. Gridline state now excludes gridlines whose line properties contain noFill, rather than relying only on element presence.
  • observed — Modified behavior in crates/pptx/src/read/chart.rs: Major and minor gridline flags now use the new check for an explicitly unfilled line instead of checking whether the gridline elements exist.
  • observed — Modified behavior in crates/pptx/src/read/chart.rs: Added a test covering value axes with visible labels and filled gridlines, and with tickLblPos="none" and noFill gridlines; it asserts the corresponding hidden-axis and gridline flags.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the chart reader now takes hidden axis labels and unfilled gridlines from the chart XML. The raw summary confirms this: tickLblPos="none" now counts as hidden, and gri…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the chart reader now takes hidden axis labels and unfilled gridlines from the chart XML. The raw summary confirms this: tickLblPos="none" now counts as hidden, and gridlines count only when spPr/ln/noFill is absent. The title also cites the related issue (#1366), which is acceptable. It is a long single sentence, but it is specific and matches the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Comment @coderabbitai help to get the list of available commands.

@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit e713bcc into storytold:main Oct 30, 2026
1 check passed
@echelon

echelon commented Oct 30, 2026

Copy link
Copy Markdown
Member

Landed on main, thank you @Harrison-Booth for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft

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.

3 participants