Charts: axis c:spPr is appended out of OOXML schema order
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
Línea de trabajo
Empieza en sdpm/sdpm/engine/builder/elements/chart.py, en el bloque “Axis lines” de _add_chart, y comprueba las otras inserciones de c:spPr según el orden del esquema de ejes. Crea gráficos de barras y de líneas, y después verifica que c:spPr preceda a c:txPr y c:crossAx en c:valAx y c:catAx; ejecuta ruff y pytest sdpm/tests/test_chart_roundtrip.py, y añade una entrada Fixed bajo [Unreleased] en CHANGELOG.md.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 136
- Forks
- 13
- Merge medio
- 7 h 43 min
- PR fusionados (30 d)
- 180
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws-samples/sample-spec-driven-presentation-maker
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aws-samples/sample-spec-driven-presentation-maker#646 ·
Los mantenedores suelen responder en 1 día
-
Charts: setting `valueAxis` skips theme styling of axis labels and axis linesPosiblemente ocupada @ShotaroKataoka la tomó hace 1 día. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
aws-samples/sample-spec-driven-presentation-maker#630 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
aws-samples/sample-spec-driven-presentation-maker#627 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
aws-samples/sample-spec-driven-presentation-maker#622 ·
Los mantenedores suelen responder en 1 día
-
Charts: add radar charts (chartType "radar")Posiblemente ocupada @tridev-tej la tomó hace 4 días. Abiertoenhancement good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
aws-samples/sample-spec-driven-presentation-maker#621 ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws-samples/sample-spec-driven-presentation-maker
Issues similares
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in productionAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 64/100
googleapis/google-cloud-python#19115 ·
Los mantenedores suelen responder en 2 días
-
CRS WKT default to WKT2Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug prov-json
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día