Charts: setting `valueAxis` skips theme styling of axis labels and axis lines
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 67/100
Línea de trabajo
Start with _add_chart in sdpm/sdpm/engine/builder/elements/chart.py and read how valueAxis, categoryAxis, and _chartFingerprint distinguish edited imports from hand-written JSON. Review tests/test_chart_roundtrip.py and add the stated case: a scale-only valueAxis should retain themed tick-label size and colour. Run the chart round-trip tests; done when the regression passes without changing styling restored for unedited PPTX charts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
_add_chart (sdpm/sdpm/engine/builder/elements/chart.py) treats a chart that has valueAxis or categoryAxis as a round-tripped chart (if not val_axis_def and not cat_axis_def:). For such a chart it skips:
- tick label font size, colour and font (
tick_font_size,text_muted,fonts["halfwidth"]) - the subtle axis line colour and width
- the title colour (
elif not elem.get("valueAxis")) and the data label font
So a chart written by an agent that only sets the scale ("valueAxis": {"min": 0, "max": 5, "majorUnit": 1}) gets the default chart text: large, without the theme colour or font, with default tick marks. The same chart without valueAxis gets 10pt muted labels in the template font.
This affects bar, line and radar. It matters most for radar (#623): its guide recommends valueAxis so the rings match the scoring scale, so most radar charts take this path. Rendering the chart-radar guide's example on blank-dark shows white labels at the default size and white cross tick marks on every spoke. Removing valueAxis gives themed labels.
Expected
Setting the axis scale should not turn off theme styling. Only a chart read back from a PPTX should keep the styling it came with.
Notes for the fix
- Round-tripped charts are now told apart by
_chartFingerprint. An unedited one restores_chartXmland never reaches this code, so this code path only runs for an edited import or for JSON written by hand or by an agent. --minimalJSON (sdpm/sdpm/engine/schema/minimal.py) drops every_key, including_chartFingerprintand_chartFontSize. Decide what a minimal round trip should look like before choosing the new condition.- Tests:
tests/test_chart_roundtrip.py. Add a case wherevalueAxiswith onlymin/max/majorUnitstill gets the themed tick label font size and colour.
Version
main at a44c66a3 (plus #623 for the radar case)
- Lenguaje dominante
- Python
- Estrellas
- 136
- Forks
- 13
- Merge medio
- 7 h 36 min
- PR fusionados (30 d)
- 175
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
-
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
-
enhancement good first issue
Dificultad 3/5 1-2 días Aptitud para principiantes 77/100
aws-samples/sample-spec-driven-presentation-maker#620 ·
Los mantenedores suelen responder en 1 día
-
Make the element JSON round trip match the docs (4 small fixes)Posiblemente ocupada @Vedant-200 la tomó hace 5 días. Abiertoenhancement good first issue
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
aws-samples/sample-spec-driven-presentation-maker#586 ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws-samples/sample-spec-driven-presentation-maker
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
samuelclay/NewsBlur#2214 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
MODEL_NOT_FOUND gives no suggestion for a model listed only as model:profilePosiblemente ocupada @ShaiShmuel la tomó hoy. Abiertoenhancement rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
superlinked/sie#985 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
readthedocs/readthedocs-builder#73 ·
Los mantenedores suelen responder en 1 día