Charts: axis c:spPr is appended out of OOXML schema order
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 86/100
Hướng nghiên cứu
Bắt đầu trong sdpm/sdpm/engine/builder/elements/chart.py, ở khối “Axis lines” của _add_chart, và đối chiếu các vị trí chèn c:spPr khác với thứ tự trong lược đồ trục. Tạo biểu đồ cột và biểu đồ đường, sau đó xác minh rằng c:spPr đứng trước c:txPr và c:crossAx trong c:valAx và c:catAx; chạy ruff và pytest sdpm/tests/test_chart_roundtrip.py, rồi thêm một mục Fixed bên dưới [Unreleased] trong CHANGELOG.md.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
When the chart builder styles the axis line, it adds the axis c:spPr with etree.SubElement(ax_el, qn('c:spPr')). That appends it as the last child of c:valAx / c:catAx. In the OOXML schema (CT_ValAx / CT_CatAx), c:spPr belongs after c:tickLblPos and before c:txPr / c:crossAx. So the generated chart XML is out of schema order.
Where
sdpm/sdpm/engine/builder/elements/chart.py, the "Axis lines" block in _add_chart (two places: the themed default and the valueAxis.line == "none" branch). The same pattern may apply to other SubElement(..., 'c:spPr') calls in that function; worth checking each against the schema.
Why it matters
As far as I know, PowerPoint accepts this today, so it is a latent problem rather than a visible one. I have not tested every Office version. Strict consumers and validators can reject it, and it will bite when a new chart type (see #620, #621, #622) reuses this code.
Expected
Insert c:spPr at its schema position instead of appending. For example, insert it before the first existing c:txPr, c:crossAx or c:crosses child, or immediately after c:tickLblPos when present.
Done when
- A helper (for example
_insert_in_order) putsc:spPrin the right place forc:valAxandc:catAx. - A test builds a bar and a line chart (the types that have axes) and checks that, in
c:valAxandc:catAx,c:spPrcomes beforec:txPrandc:crossAx. -
CHANGELOG.md[Unreleased]has aFixedentry. -
ruffandpytest sdpm/tests/test_chart_roundtrip.pypass.
This is a good first issue: one file, one helper, one test.
🤖 Created by Kiro Crew
- Ngôn ngữ chính
- Python
- Star
- 136
- Fork
- 13
- Merge trung bình
- 7 giờ 43 phút
- Pull request đã merge (30 ngày)
- 180
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-samples/sample-spec-driven-presentation-maker
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aws-samples/sample-spec-driven-presentation-maker#646 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis linesCó thể đã có người làm @ShotaroKataoka đã nhận 1 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
aws-samples/sample-spec-driven-presentation-maker#627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
aws-samples/sample-spec-driven-presentation-maker#622 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Charts: add radar charts (chartType "radar")Có thể đã có người làm @tridev-tej đã nhận 4 ngày trước. Đang mởenhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws-samples/sample-spec-driven-presentation-maker
Issue tương tự
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in productionĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
googleapis/google-cloud-python#19115 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
CRS WKT default to WKT2Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug prov-json
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày