Charts: axis c:spPr is appended out of OOXML schema order
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
sdpm/sdpm/engine/builder/elements/chart.py の _add_chart にある「Axis lines」ブロックから始め、ほかの c:spPr の挿入箇所を軸スキーマの順序と照らして確認してください。棒グラフと折れ線グラフを作成し、c:valAx と c:catAx で c:spPr が c:txPr および c:crossAx より前にあることを確認してください。ruff と pytest sdpm/tests/test_chart_roundtrip.py を実行し、CHANGELOG.md の [Unreleased] の下に Fixed の項目を追加してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 136
- フォーク
- 13
- 平均マージ
- 7時間 43分
- マージ済み PR(30日)
- 180
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws-samples/sample-spec-driven-presentation-maker のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws-samples/sample-spec-driven-presentation-maker#646 ·
メンテナーはふだん 1 日以内に返信
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis lines対応中かも @ShotaroKataoka が 1 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
aws-samples/sample-spec-driven-presentation-maker#627 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
aws-samples/sample-spec-driven-presentation-maker#622 ·
メンテナーはふだん 1 日以内に返信
-
Charts: add radar charts (chartType "radar")対応中かも @tridev-tej が 4 日前に担当しました。 オープンenhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
メンテナーはふだん 1 日以内に返信
aws-samples/sample-spec-driven-presentation-maker の issue をすべて見る
似ている issue
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in productionオープン
難易度 1/5 1時間未満 初心者へのやさしさ 64/100
googleapis/google-cloud-python#19115 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug prov-json
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信