Repository navigation
Charts: hidden axis labels and unfilled gridlines are read from the chart XML (refs #1366) - #1469
Conversation
…s are not drawn (refs storytold#1366)
|
No actionable comments were generated in the recent review.
|
| 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:
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 withnoFillare 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:
cratesArchitecture 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 containnoFill, 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"andnoFillgridlines; it asserts the corresponding hidden-axis and gridline flags.
-
Pre-merge checks: 
5
-
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.
|
Landed on main, thank you @Harrison-Booth for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft |
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, likec:delete(it setsy_hidden, whose renderer path already drops labels and keeps gridlines).c:majorGridlines/c:minorGridlineswhosec:spPr/a:lnholdsa:noFillis 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:valAxhasc:tickLblPos val="none"andc:majorGridlines/c:spPr/a:ln/a:noFill(plus ana14:hiddenLineextension), which is the shape the reader now handles. The category axis saved withc:delete val="1"while keeping itsc: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_readincrates/pptx/src/read/chart.rs. I did not build or run it locally; onlycargo fmt --checkran. The fork's CI runs the suite. No other open PR touches chart axis reading.Summary by CodeRabbit